Skip to content

Commit

Permalink
FIELD_API: fix fetchcontent mechanism so it isn't triggered if field_…
Browse files Browse the repository at this point in the history
…api is in ifs-source/contrib
  • Loading branch information
awnawab committed Dec 22, 2023
1 parent 55df4e2 commit 70c58b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/ecwam_fetchcontent_field_api.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 70c58b9

Please sign in to comment.