-
Manuel Grizonnet authored
This allows a module to be built outside the OTB source tree by adding the following to the module's top level CMakeLists.txt: project(MyModule) if(NOT OTB_SOURCE_DIR) find_package(OTB REQUIRED) list(APPEND CMAKE_MODULE_PATH ${OTB_CMAKE_DIR}) include(OTBModuleExternal) else() otb_module_impl() endif() Move otb_add_test into CMake/OTBModuleTest.cmake so they can be re-used. This can be used for building against an ITK build tree, not an install tree. This contribution is mostly inspired by Matt McCormick to ITK to support ITK module outside the source tree: https://github.com/InsightSoftwareConsortium/ITK/commit/387e9ff8712751a65ff65e36e526c92525d906aa The OTB template module was also updated accordingly: https://github.com/orfeotoolbox/otbExternalModuleTemplate
3d40f86f