diff --git a/CMake/OTBWrapperMacros.cmake b/CMake/OTBWrapperMacros.cmake index eb988ae4045eefb1554a86a124cee4ffdbe33185..135e8862f89a9ab8cd612da8e740e282dc9c67a6 100644 --- a/CMake/OTBWrapperMacros.cmake +++ b/CMake/OTBWrapperMacros.cmake @@ -1,4 +1,9 @@ -include(OTBParseArguments) + +# When used externally, OTBParseArguments is included explicitely in UseOTB.cmake +# Otherwise, let's include it here +if (NOT COMMAND OTB_PARSE_ARGUMENTS) + include(OTBParseArguments) +endif() macro(OTB_CREATE_APPLICATION) OTB_PARSE_ARGUMENTS( diff --git a/CMake/UseOTB.cmake.in b/CMake/UseOTB.cmake.in index cfbf10085043195f7500e07c048b864bf8527041..7d389add8ad3b9ad6cb24c67ea342d90407eac23 100644 --- a/CMake/UseOTB.cmake.in +++ b/CMake/UseOTB.cmake.in @@ -266,3 +266,7 @@ IF(OTB_USE_PQXX) INCLUDE_DIRECTORIES(${PQXX_INCLUDE_DIR}) ENDIF(OTB_USE_PQXX) + +INCLUDE(${OTB_LIBRARY_DIRS}/OTBParseArguments.cmake) +INCLUDE(${OTB_LIBRARY_DIRS}/OTBWrapperMacros.cmake) +