Commit 995eb96c authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: install application macros and FindXXX.cmake

parent 73b40168
...@@ -35,6 +35,10 @@ endif() ...@@ -35,6 +35,10 @@ endif()
# Load module interface macros. # Load module interface macros.
include("@OTB_CONFIG_MODULE_API_FILE@") include("@OTB_CONFIG_MODULE_API_FILE@")
# Load application macros.
include(CMakeParseArguments)
include("@OTB_CONFIG_APPLI_MACROS_FILE@")
# Compute set of requested modules. # Compute set of requested modules.
if(OTB_FIND_COMPONENTS) if(OTB_FIND_COMPONENTS)
# Specific modules requested by find_package(OTB). # Specific modules requested by find_package(OTB).
......
...@@ -310,6 +310,7 @@ set(OTB_USE_FILE "${OTB_SOURCE_DIR}/CMake/UseOTB.cmake") ...@@ -310,6 +310,7 @@ set(OTB_USE_FILE "${OTB_SOURCE_DIR}/CMake/UseOTB.cmake")
set(OTB_CONFIG_TARGETS_CONDITION " AND NOT OTB_BINARY_DIR") set(OTB_CONFIG_TARGETS_CONDITION " AND NOT OTB_BINARY_DIR")
set(OTB_CONFIG_TARGETS_FILE "${OTB_BINARY_DIR}/OTBTargets.cmake") set(OTB_CONFIG_TARGETS_FILE "${OTB_BINARY_DIR}/OTBTargets.cmake")
set(OTB_CONFIG_MODULE_API_FILE "${OTB_SOURCE_DIR}/CMake/OTBModuleAPI.cmake") set(OTB_CONFIG_MODULE_API_FILE "${OTB_SOURCE_DIR}/CMake/OTBModuleAPI.cmake")
set(OTB_CONFIG_APPLI_MACROS_FILE "${OTB_SOURCE_DIR}/CMake/OTBApplicationMacros.cmake")
configure_file(CMake/OTBConfig.cmake.in OTBConfig.cmake @ONLY) configure_file(CMake/OTBConfig.cmake.in OTBConfig.cmake @ONLY)
# Generate OTBConfig.cmake for the install tree. # Generate OTBConfig.cmake for the install tree.
...@@ -329,6 +330,7 @@ set(OTB_USE_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/UseOTB.cmake ...@@ -329,6 +330,7 @@ set(OTB_USE_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/UseOTB.cmake
set(OTB_CONFIG_TARGETS_CONDITION "") set(OTB_CONFIG_TARGETS_CONDITION "")
set(OTB_CONFIG_TARGETS_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBTargets.cmake") set(OTB_CONFIG_TARGETS_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBTargets.cmake")
set(OTB_CONFIG_MODULE_API_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBModuleAPI.cmake") set(OTB_CONFIG_MODULE_API_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBModuleAPI.cmake")
set(OTB_CONFIG_APPLI_MACROS_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBApplicationMacros.cmake")
configure_file(CMake/OTBConfig.cmake.in CMakeFiles/OTBConfig.cmake @ONLY) configure_file(CMake/OTBConfig.cmake.in CMakeFiles/OTBConfig.cmake @ONLY)
...@@ -343,6 +345,7 @@ configure_file(CMake/OTBConfigVersion.cmake.in OTBConfigVersion.cmake @ONLY) ...@@ -343,6 +345,7 @@ configure_file(CMake/OTBConfigVersion.cmake.in OTBConfigVersion.cmake @ONLY)
install(FILES ${OTB_BINARY_DIR}/CMakeFiles/OTBConfig.cmake install(FILES ${OTB_BINARY_DIR}/CMakeFiles/OTBConfig.cmake
${OTB_BINARY_DIR}/OTBConfigVersion.cmake ${OTB_BINARY_DIR}/OTBConfigVersion.cmake
CMake/OTBApplicationMacros.cmake
CMake/OTBModuleAPI.cmake CMake/OTBModuleAPI.cmake
CMake/UseOTB.cmake CMake/UseOTB.cmake
DESTINATION ${OTB_INSTALL_PACKAGE_DIR} DESTINATION ${OTB_INSTALL_PACKAGE_DIR}
...@@ -359,6 +362,10 @@ else() ...@@ -359,6 +362,10 @@ else()
DESTINATION ${OTB_INSTALL_PACKAGE_DIR} COMPONENT Development) DESTINATION ${OTB_INSTALL_PACKAGE_DIR} COMPONENT Development)
endif() endif()
# install FindXXX.cmake
file(GLOB OTB_FIND_PACKAGE_SCRIPTS CMake/Find*.cmake)
install(FILES ${OTB_FIND_PACKAGE_SCRIPTS} DESTINATION ${OTB_INSTALL_PACKAGE_DIR} COMPONENT Development)
# TODO : install release notes, copyright notice, ... # TODO : install release notes, copyright notice, ...
# install(FILES "LICENSE" "NOTICE" "README.txt" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime) # install(FILES "LICENSE" "NOTICE" "README.txt" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime)
install(FILES "LICENSE" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime) install(FILES "LICENSE" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment