Commit b471469d authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

ENH: Change INSTALL management in OTB CMakeLists.txt and subdirs. Necessary for CPack capability

parent cb95e545
...@@ -70,8 +70,8 @@ SET(OTB_VERSION_PATCH "0") ...@@ -70,8 +70,8 @@ SET(OTB_VERSION_PATCH "0")
SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}") SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
# => Comment for OTB 2.6.0 # => Comment for OTB 3.0.0
OPTION(BUILD_TESTING "Build testing." OFF) #OPTION(BUILD_TESTING "Build testing." OFF)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# OTB build configuration options. # OTB build configuration options.
...@@ -84,6 +84,16 @@ OPTION(BUILD_SHARED_LIBS "Build OTB with shared libraries." ON) ...@@ -84,6 +84,16 @@ OPTION(BUILD_SHARED_LIBS "Build OTB with shared libraries." ON)
ENDIF(WIN32) ENDIF(WIN32)
SET(OTB_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) SET(OTB_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
IF(NOT OTB_NO_LIBRARY_VERSION)
# This setting of SOVERSION assumes that any API change
# will increment either the minor or major version number of OTB.
SET(OTB_LIBRARY_PROPERTIES
VERSION "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}"
SOVERSION "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}"
)
ENDIF(NOT OTB_NO_LIBRARY_VERSION)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Case for release 2.2.1 # Case for release 2.2.1
...@@ -456,6 +466,90 @@ ENDIF(GDAL_HAS_OGR) ...@@ -456,6 +466,90 @@ ENDIF(GDAL_HAS_OGR)
# End connections whith external libraries # End connections whith external libraries
#------------------------------- #-------------------------------
#-----------------------------------------------------------------------------
# Installation vars.
# OTB_INSTALL_BIN_DIR - binary dir (executables)
# OTB_INSTALL_LIB_DIR - library dir (libs)
# OTB_INSTALL_DATA_DIR - share dir (say, examples, data, etc)
# OTB_INSTALL_INCLUDE_DIR - include dir (headers)
# OTB_INSTALL_PACKAGE_DIR - package/export configuration files
# OTB_INSTALL_NO_DEVELOPMENT - do not install development files
# OTB_INSTALL_NO_RUNTIME - do not install runtime files
# OTB_INSTALL_NO_DOCUMENTATION - do not install documentation files
IF(NOT OTB_INSTALL_BIN_DIR)
SET(OTB_INSTALL_BIN_DIR "/bin")
ENDIF(NOT OTB_INSTALL_BIN_DIR)
IF(NOT OTB_INSTALL_LIB_DIR)
SET(OTB_INSTALL_LIB_DIR "/lib/otb")
ENDIF(NOT OTB_INSTALL_LIB_DIR)
IF(NOT OTB_INSTALL_DATA_DIR)
SET(OTB_INSTALL_DATA_DIR "/share/otb")
ENDIF(NOT OTB_INSTALL_DATA_DIR)
IF(NOT OTB_INSTALL_INCLUDE_DIR)
SET(OTB_INSTALL_INCLUDE_DIR "/include/otb")
ENDIF(NOT OTB_INSTALL_INCLUDE_DIR)
IF(NOT OTB_INSTALL_PACKAGE_DIR)
SET(OTB_INSTALL_PACKAGE_DIR ${OTB_INSTALL_LIB_DIR}
CACHE INTERNAL "")
ENDIF(NOT OTB_INSTALL_PACKAGE_DIR)
IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
SET(OTB_INSTALL_NO_DEVELOPMENT 0)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
IF(NOT OTB_INSTALL_NO_RUNTIME)
SET(OTB_INSTALL_NO_RUNTIME 0)
ENDIF(NOT OTB_INSTALL_NO_RUNTIME)
IF(NOT OTB_INSTALL_NO_DOCUMENTATION)
SET(OTB_INSTALL_NO_DOCUMENTATION 0)
ENDIF(NOT OTB_INSTALL_NO_DOCUMENTATION)
SET(OTB_INSTALL_NO_LIBRARIES)
IF(OTB_BUILD_SHARED_LIBS)
IF(OTB_INSTALL_NO_RUNTIME AND OTB_INSTALL_NO_DEVELOPMENT)
SET(OTB_INSTALL_NO_LIBRARIES 1)
ENDIF(OTB_INSTALL_NO_RUNTIME AND OTB_INSTALL_NO_DEVELOPMENT)
ELSE(OTB_BUILD_SHARED_LIBS)
IF(OTB_INSTALL_NO_DEVELOPMENT)
SET(OTB_INSTALL_NO_LIBRARIES 1)
ENDIF(OTB_INSTALL_NO_DEVELOPMENT)
ENDIF(OTB_BUILD_SHARED_LIBS)
# Because INSTALL_* commands require a leading / and because INSTALL (cmake 2.4
# and newer) requires no leading / to install under INSTALL_PREFIX, we
# are stripping the leading /. In the future, there should be no leading
# / in any install directory variables
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_LIB_DIR_CM24 "${OTB_INSTALL_LIB_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_BIN_DIR_CM24 "${OTB_INSTALL_BIN_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_INCLUDE_DIR_CM24 "${OTB_INSTALL_INCLUDE_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_PACKAGE_DIR_CM24 "${OTB_INSTALL_PACKAGE_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_DOXYGEN_DIR_CM24 "${OTB_INSTALL_DOXYGEN_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_TCL_DIR_CM24 "${OTB_INSTALL_TCL_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_JAVA_DIR_CM24 "${OTB_INSTALL_JAVA_DIR}")
# Make sure the user does not try to install on top of the build tree.
IF(WIN32 OR APPLE OR UNIX)
STRING(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX)
STRING(TOLOWER "${OTB_BINARY_DIR}" _BUILD)
ELSE(WIN32 OR APPLE OR UNIX)
SET(_PREFIX "${CMAKE_INSTALL_PREFIX}")
SET(_BUILD "${OTB_BINARY_DIR}")
ENDIF(WIN32 OR APPLE OR UNIX)
IF("${_PREFIX}" STREQUAL "${_BUILD}")
MESSAGE(FATAL_ERROR
"The current CMAKE_INSTALL_PREFIX points at the build tree:\n"
" ${CMAKE_INSTALL_PREFIX}\n"
"This is not supported."
)
ENDIF("${_PREFIX}" STREQUAL "${_BUILD}")
# The fluid-generated fltk sources have many warnings. This macro # The fluid-generated fltk sources have many warnings. This macro
# will disable warnings for the generated files on some compilers. # will disable warnings for the generated files on some compilers.
MACRO(OTB_DISABLE_FLTK_GENERATED_WARNINGS files) MACRO(OTB_DISABLE_FLTK_GENERATED_WARNINGS files)
...@@ -520,8 +614,8 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake) ...@@ -520,8 +614,8 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# MESSAGE(FATAL_ERROR ...) commands are invoked. # MESSAGE(FATAL_ERROR ...) commands are invoked.
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake) INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT) MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT)
ENABLE_TESTING()
IF(BUILD_TESTING) IF(BUILD_TESTING)
ENABLE_TESTING()
SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard") SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
MARK_AS_ADVANCED(BUILDNAME) MARK_AS_ADVANCED(BUILDNAME)
ENDIF(BUILD_TESTING) ENDIF(BUILD_TESTING)
...@@ -740,13 +834,13 @@ INCLUDE_DIRECTORIES( ...@@ -740,13 +834,13 @@ INCLUDE_DIRECTORIES(
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Uninstall cmake use to uninstall OTB. # Uninstall cmake use to uninstall OTB.
CONFIGURE_FILE( # CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in" # "${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" # "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY) # IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall # ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") # "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Help other projects use OTB. # Help other projects use OTB.
...@@ -755,10 +849,21 @@ ADD_CUSTOM_TARGET(uninstall ...@@ -755,10 +849,21 @@ ADD_CUSTOM_TARGET(uninstall
CONFIGURE_FILE(${OTB_SOURCE_DIR}/UseOTB.cmake.in CONFIGURE_FILE(${OTB_SOURCE_DIR}/UseOTB.cmake.in
${OTB_BINARY_DIR}/UseOTB.cmake COPYONLY IMMEDIATE) ${OTB_BINARY_DIR}/UseOTB.cmake COPYONLY IMMEDIATE)
# Save the compiler settings so another project can import them. # Save the compiler settings so another project can import them.
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
CMAKE_EXPORT_BUILD_SETTINGS(${OTB_BINARY_DIR}/OTBBuildSettings.cmake) CMAKE_EXPORT_BUILD_SETTINGS(${OTB_BINARY_DIR}/OTBBuildSettings.cmake)
INSTALL_FILES(/lib/otb .cmake OTBBuildSettings) #INSTALL_FILES(/lib/otb .cmake OTBBuildSettings)
IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
INSTALL(FILES
${OTB_BINARY_DIR}/OTBBuildSettings.cmake
${OTB_BINARY_DIR}/OTBLibraryDepends.cmake
${OTB_BINARY_DIR}/UseOTB.cmake
DESTINATION ${OTB_INSTALL_PACKAGE_DIR_CM24}
COMPONENT Development
)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
# Save library dependencies. # Save library dependencies.
EXPORT_LIBRARY_DEPENDENCIES(${OTB_BINARY_DIR}/OTBLibraryDepends.cmake) EXPORT_LIBRARY_DEPENDENCIES(${OTB_BINARY_DIR}/OTBLibraryDepends.cmake)
...@@ -766,9 +871,15 @@ EXPORT_LIBRARY_DEPENDENCIES(${OTB_BINARY_DIR}/OTBLibraryDepends.cmake) ...@@ -766,9 +871,15 @@ EXPORT_LIBRARY_DEPENDENCIES(${OTB_BINARY_DIR}/OTBLibraryDepends.cmake)
# Create the OTBConfig.cmake file containing the OTB configuration. # Create the OTBConfig.cmake file containing the OTB configuration.
INCLUDE (${OTB_SOURCE_DIR}/otbGenerateOTBConfig.cmake) INCLUDE (${OTB_SOURCE_DIR}/otbGenerateOTBConfig.cmake)
# Install some files. IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(/include/otb .h otbConfigure) INSTALL(FILES ${OTB_BINARY_DIR}/otbConfigure.h
INSTALL_FILES(/lib/otb .cmake UseOTB OTBLibraryDepends OTBConfig ) DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
#INSTALL_FILES(/include/otb .h otbConfigure)
#INSTALL_FILES(/lib/otb .cmake UseOTB OTBLibraryDepends OTBConfig )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Add compiler flags OTB needs to work on this platform. This must be # Add compiler flags OTB needs to work on this platform. This must be
...@@ -784,8 +895,7 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OTB_REQUIRED_LINK_ ...@@ -784,8 +895,7 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OTB_REQUIRED_LINK_
# Set up CPack support, to be able to distribute OTB binary packages. It will # Set up CPack support, to be able to distribute OTB binary packages. It will
# be particulary useful to distributed prebuilt OTB. # be particulary useful to distributed prebuilt OTB.
# #
INCLUDE(InstallRequiredSystemLibraries)
#INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_NAME "OTB" CACHE STRING "Package name") SET(CPACK_PACKAGE_NAME "OTB" CACHE STRING "Package name")
MARK_AS_ADVANCED(CPACK_PACKAGE_NAME) MARK_AS_ADVANCED(CPACK_PACKAGE_NAME)
......
...@@ -4,15 +4,21 @@ FILE(GLOB OTBBasicFilters_SRCS "*.cxx" ) ...@@ -4,15 +4,21 @@ FILE(GLOB OTBBasicFilters_SRCS "*.cxx" )
ADD_LIBRARY(OTBBasicFilters ${OTBBasicFilters_SRCS}) ADD_LIBRARY(OTBBasicFilters ${OTBBasicFilters_SRCS})
TARGET_LINK_LIBRARIES (OTBBasicFilters OTBCommon ITKBasicFilters otbedison) TARGET_LINK_LIBRARIES (OTBBasicFilters OTBCommon ITKBasicFilters otbedison)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBBasicFilters PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBBasicFilters IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBBasicFilters
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/BasicFilters DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/BasicFilters
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,15 +4,21 @@ FILE(GLOB OTBChangeDetection_SRCS "*.cxx" ) ...@@ -4,15 +4,21 @@ FILE(GLOB OTBChangeDetection_SRCS "*.cxx" )
ADD_LIBRARY(OTBChangeDetection ${OTBChangeDetection_SRCS}) ADD_LIBRARY(OTBChangeDetection ${OTBChangeDetection_SRCS})
TARGET_LINK_LIBRARIES (OTBChangeDetection OTBCommon ITKStatistics) TARGET_LINK_LIBRARIES (OTBChangeDetection OTBCommon ITKStatistics)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBChangeDetection PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBChangeDetection IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBChangeDetection
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/ChangeDetection
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,16 +4,21 @@ FILE(GLOB OTBCommon_SRCS "*.cxx" ) ...@@ -4,16 +4,21 @@ FILE(GLOB OTBCommon_SRCS "*.cxx" )
ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS}) ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS})
TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon) TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBCommon PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBCommon IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBCommon
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Common DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Common
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,15 +4,21 @@ FILE(GLOB OTBDisparityMap_SRCS "*.cxx" ) ...@@ -4,15 +4,21 @@ FILE(GLOB OTBDisparityMap_SRCS "*.cxx" )
ADD_LIBRARY(OTBDisparityMap ${OTBDisparityMap_SRCS}) ADD_LIBRARY(OTBDisparityMap ${OTBDisparityMap_SRCS})
TARGET_LINK_LIBRARIES (OTBDisparityMap OTBCommon itkvnl) TARGET_LINK_LIBRARIES (OTBDisparityMap OTBCommon itkvnl)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBDisparityMap PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBDisparityMap IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBDisparityMap
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/DisparityMap DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/DisparityMap
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -5,15 +5,21 @@ FILE(GLOB OTBFeatureExtraction_SRCS "*.cxx" ) ...@@ -5,15 +5,21 @@ FILE(GLOB OTBFeatureExtraction_SRCS "*.cxx" )
ADD_LIBRARY(OTBFeatureExtraction ${OTBFeatureExtraction_SRCS}) ADD_LIBRARY(OTBFeatureExtraction ${OTBFeatureExtraction_SRCS})
TARGET_LINK_LIBRARIES (OTBFeatureExtraction OTBCommon otbsiftfast) TARGET_LINK_LIBRARIES (OTBFeatureExtraction OTBCommon otbsiftfast)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBFeatureExtraction PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBFeatureExtraction IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBFeatureExtraction
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/FeatureExtraction
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,15 +4,22 @@ FILE(GLOB OTBFusion_SRCS "*.cxx" ) ...@@ -4,15 +4,22 @@ FILE(GLOB OTBFusion_SRCS "*.cxx" )
ADD_LIBRARY(OTBFusion ${OTBFusion_SRCS}) ADD_LIBRARY(OTBFusion ${OTBFusion_SRCS})
TARGET_LINK_LIBRARIES (OTBFusion OTBCommon) TARGET_LINK_LIBRARIES (OTBFusion OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBFusion PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBFusion IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBFusion
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Fusion DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Fusion
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -13,19 +13,21 @@ ENDIF(APPLE AND BUILD_SHARED_LIBS) ...@@ -13,19 +13,21 @@ ENDIF(APPLE AND BUILD_SHARED_LIBS)
ADD_LIBRARY(OTBGui ${OTBGui_SRCS}) ADD_LIBRARY(OTBGui ${OTBGui_SRCS})
TARGET_LINK_LIBRARIES (OTBGui OTBCommon ${FLTK_LIBRARIES}) TARGET_LINK_LIBRARIES (OTBGui OTBCommon ${FLTK_LIBRARIES})
IF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBGui SET_TARGET_PROPERTIES(OTBGui PROPERTIES ${OTB_LIBRARY_PROPERTIES})
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries ENDIF(OTB_LIBRARY_PROPERTIES)
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBGui
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES ${__files1} ${__files2} FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Gui INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Gui
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -35,11 +35,17 @@ ENDIF( OTB_COMPILE_JPEG2000 ) ...@@ -35,11 +35,17 @@ ENDIF( OTB_COMPILE_JPEG2000 )
IF( OTB_USE_CURL ) IF( OTB_USE_CURL )
TARGET_LINK_LIBRARIES (OTBIO ${CURL_LIBRARY}) TARGET_LINK_LIBRARIES (OTBIO ${CURL_LIBRARY})
ENDIF( OTB_USE_CURL ) ENDIF( OTB_USE_CURL )
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBIO PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBIO
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries IF(NOT OTB_INSTALL_NO_LIBRARIES)
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBIO
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
...@@ -55,7 +61,12 @@ IF(NOT OTB_COMPILE_JPEG2000) ...@@ -55,7 +61,12 @@ IF(NOT OTB_COMPILE_JPEG2000)
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIO.h" ) LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIO.h" )
ENDIF(NOT OTB_COMPILE_JPEG2000) ENDIF(NOT OTB_COMPILE_JPEG2000)
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/IO IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/IO
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -5,16 +5,21 @@ FILE(GLOB OTBLearning_SRCS "*.cxx" ) ...@@ -5,16 +5,21 @@ FILE(GLOB OTBLearning_SRCS "*.cxx" )
ADD_LIBRARY(OTBLearning ${OTBLearning_SRCS}) ADD_LIBRARY(OTBLearning ${OTBLearning_SRCS})
TARGET_LINK_LIBRARIES (OTBLearning OTBCommon otbsvm) TARGET_LINK_LIBRARIES (OTBLearning OTBCommon otbsvm)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBLearning PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBLearning IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBLearning
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Learning DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Learning
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,15 +4,21 @@ FILE(GLOB OTBMarkov_SRCS "*.cxx" ) ...@@ -4,15 +4,21 @@ FILE(GLOB OTBMarkov_SRCS "*.cxx" )
ADD_LIBRARY(OTBMarkov ${OTBMarkov_SRCS}) ADD_LIBRARY(OTBMarkov ${OTBMarkov_SRCS})
TARGET_LINK_LIBRARIES (OTBMarkov OTBCommon) TARGET_LINK_LIBRARIES (OTBMarkov OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBMarkov PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBMarkov IF(NOT OTB_INSTALL_NO_LIBRARIES)
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries INSTALL(TARGETS OTBMarkov
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development) LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h") IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${__files1} ${__files2} INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Markov DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Markov
COMPONENT Development) COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
...@@ -4,15 +4,21 @@ FILE(GLOB OTBMultiScale_SRCS "*.cxx" ) ...@@ -4,15 +4,21 @@ FILE(GLOB OTBMultiScale_SRCS "*.cxx" )
ADD_LIBRARY(OTBMultiScale ${OTBMultiScale_SRCS}) ADD_LIBRARY(OTBMultiScale ${OTBMultiScale_SRCS})
TARGET_LINK_LIBRARIES (OTBMultiScale OTBCommon) TARGET_LINK_LIBRARIES (OTBMultiScale OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBMultiScale PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)