From 70c58b9e3ee50e322d268fe6f3c8f152927349b7 Mon Sep 17 00:00:00 2001 From: Ahmad Nawab Date: Thu, 21 Dec 2023 12:06:19 +0000 Subject: [PATCH] FIELD_API: fix fetchcontent mechanism so it isn't triggered if field_api is in ifs-source/contrib --- cmake/ecwam_fetchcontent_field_api.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/ecwam_fetchcontent_field_api.cmake b/cmake/ecwam_fetchcontent_field_api.cmake index 7a5705259..40cd1e889 100644 --- a/cmake/ecwam_fetchcontent_field_api.cmake +++ b/cmake/ecwam_fetchcontent_field_api.cmake @@ -14,10 +14,10 @@ set(clone_field_api TRUE) if(field_api_FOUND) cmake_path(RELATIVE_PATH field_api_DIR BASE_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE path_var) cmake_path(GET path_var PARENT_PATH parent_path) - string(FIND ${parent_path} "../" result_var) + string(FIND ${parent_path} "_deps" result_var) # If field_api is found but was not cloned by ecWAM, clone_field_api is set to FALSE - string(COMPARE EQUAL ${result_var} "-1" clone_field_api) + string(COMPARE NOTEQUAL ${result_var} "-1" clone_field_api) endif() if( clone_field_api )