Commit b471469d authored by Thomas Feuvrier's avatar Thomas Feuvrier

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")
SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
# => Comment for OTB 2.6.0
OPTION(BUILD_TESTING "Build testing." OFF)
# => Comment for OTB 3.0.0
#OPTION(BUILD_TESTING "Build testing." OFF)
#-----------------------------------------------------------------------------
# OTB build configuration options.
......@@ -84,6 +84,16 @@ OPTION(BUILD_SHARED_LIBS "Build OTB with shared libraries." ON)
ENDIF(WIN32)
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
......@@ -456,6 +466,90 @@ ENDIF(GDAL_HAS_OGR)
# 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
# will disable warnings for the generated files on some compilers.
MACRO(OTB_DISABLE_FLTK_GENERATED_WARNINGS files)
......@@ -520,8 +614,8 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# MESSAGE(FATAL_ERROR ...) commands are invoked.
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT)
ENABLE_TESTING()
IF(BUILD_TESTING)
ENABLE_TESTING()
SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard")
MARK_AS_ADVANCED(BUILDNAME)
ENDIF(BUILD_TESTING)
......@@ -740,13 +834,13 @@ INCLUDE_DIRECTORIES(
#-----------------------------------------------------------------------------
# Uninstall cmake use to uninstall OTB.
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
# CONFIGURE_FILE(
# "${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in"
# "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
# IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
# ADD_CUSTOM_TARGET(uninstall
# "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
#-----------------------------------------------------------------------------
# Help other projects use OTB.
......@@ -755,10 +849,21 @@ ADD_CUSTOM_TARGET(uninstall
CONFIGURE_FILE(${OTB_SOURCE_DIR}/UseOTB.cmake.in
${OTB_BINARY_DIR}/UseOTB.cmake COPYONLY IMMEDIATE)
# Save the compiler settings so another project can import them.
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.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.
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.
INCLUDE (${OTB_SOURCE_DIR}/otbGenerateOTBConfig.cmake)
# Install some files.
INSTALL_FILES(/include/otb .h otbConfigure)
INSTALL_FILES(/lib/otb .cmake UseOTB OTBLibraryDepends OTBConfig )
IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
INSTALL(FILES ${OTB_BINARY_DIR}/otbConfigure.h
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
......@@ -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
# be particulary useful to distributed prebuilt OTB.
#
#INCLUDE(InstallRequiredSystemLibraries)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_NAME "OTB" CACHE STRING "Package name")
MARK_AS_ADVANCED(CPACK_PACKAGE_NAME)
......
......@@ -4,15 +4,21 @@ FILE(GLOB OTBBasicFilters_SRCS "*.cxx" )
ADD_LIBRARY(OTBBasicFilters ${OTBBasicFilters_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBBasicFilters
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/BasicFilters
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}/BasicFilters
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBChangeDetection_SRCS "*.cxx" )
ADD_LIBRARY(OTBChangeDetection ${OTBChangeDetection_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBChangeDetection
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection
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}/ChangeDetection
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,16 +4,21 @@ FILE(GLOB OTBCommon_SRCS "*.cxx" )
ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBCommon
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Common
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}/Common
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBDisparityMap_SRCS "*.cxx" )
ADD_LIBRARY(OTBDisparityMap ${OTBDisparityMap_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBDisparityMap
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/DisparityMap
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}/DisparityMap
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -5,15 +5,21 @@ FILE(GLOB OTBFeatureExtraction_SRCS "*.cxx" )
ADD_LIBRARY(OTBFeatureExtraction ${OTBFeatureExtraction_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBFeatureExtraction
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
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}/FeatureExtraction
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,22 @@ FILE(GLOB OTBFusion_SRCS "*.cxx" )
ADD_LIBRARY(OTBFusion ${OTBFusion_SRCS})
TARGET_LINK_LIBRARIES (OTBFusion OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBFusion PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBFusion
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBFusion
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Fusion
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}/Fusion
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -13,19 +13,21 @@ ENDIF(APPLE AND BUILD_SHARED_LIBS)
ADD_LIBRARY(OTBGui ${OTBGui_SRCS})
TARGET_LINK_LIBRARIES (OTBGui OTBCommon ${FLTK_LIBRARIES})
INSTALL(TARGETS OTBGui
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT 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}/Gui
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBGui PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
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)
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}/Gui
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -35,11 +35,17 @@ ENDIF( OTB_COMPILE_JPEG2000 )
IF( OTB_USE_CURL )
TARGET_LINK_LIBRARIES (OTBIO ${CURL_LIBRARY})
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
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBIO
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")
......@@ -55,7 +61,12 @@ IF(NOT OTB_COMPILE_JPEG2000)
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIO.h" )
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)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -5,16 +5,21 @@ FILE(GLOB OTBLearning_SRCS "*.cxx" )
ADD_LIBRARY(OTBLearning ${OTBLearning_SRCS})
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
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBLearning
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Learning
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}/Learning
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBMarkov_SRCS "*.cxx" )
ADD_LIBRARY(OTBMarkov ${OTBMarkov_SRCS})
TARGET_LINK_LIBRARIES (OTBMarkov OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBMarkov PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBMarkov
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBMarkov
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Markov
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}/Markov
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBMultiScale_SRCS "*.cxx" )
ADD_LIBRARY(OTBMultiScale ${OTBMultiScale_SRCS})
TARGET_LINK_LIBRARIES (OTBMultiScale OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBMultiScale PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBMultiScale
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBMultiScale
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/MultiScale
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}/MultiScale
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -6,21 +6,25 @@ TARGET_LINK_LIBRARIES(OTBProjections OTBIO)
IF( OTB_USE_CURL )
TARGET_LINK_LIBRARIES (OTBProjections ${CURL_LIBRARY})
ENDIF( OTB_USE_CURL )
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBProjections PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBProjections
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBProjections
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_USE_CURL )
IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
IF( NOT OTB_USE_CURL )
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbPlaceNameToLonLat.h" )
LIST(REMOVE_ITEM __files2 "${CMAKE_CURRENT_SOURCE_DIR}/otbPlaceNameToLonLat.txx" )
ENDIF( NOT OTB_USE_CURL )
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Projections
ENDIF( NOT OTB_USE_CURL )
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Projections
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBRadiometry_SRCS "*.cxx" )
ADD_LIBRARY(OTBRadiometry ${OTBRadiometry_SRCS})
TARGET_LINK_LIBRARIES (OTBRadiometry OTBCommon otb6S)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBRadiometry PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBRadiometry
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBRadiometry
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Radiometry
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}/Radiometry
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,15 +4,21 @@ FILE(GLOB OTBSARPOLARIMETRY_SRCS "*.cxx" )
ADD_LIBRARY(OTBSARPolarimetry ${OTBSARPOLARIMETRY_SRCS})
TARGET_LINK_LIBRARIES (OTBSARPolarimetry OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBSARPolarimetry PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBSARPolarimetry
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBSARPolarimetry
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/SARPolarimetry
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}/SARPolarimetry
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -4,16 +4,22 @@ FILE(GLOB OTBSpatialReasoning_SRCS "*.cxx" )
ADD_LIBRARY(OTBSpatialReasoning ${OTBSpatialReasoning_SRCS})
TARGET_LINK_LIBRARIES (OTBSpatialReasoning OTBCommon)
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBSpatialReasoning PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
INSTALL(TARGETS OTBSpatialReasoning
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
IF(NOT OTB_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS OTBSpatialReasoning
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")
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/SpatialReasoning
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}/SpatialReasoning
COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
......@@ -11,15 +11,22 @@ ENDIF(APPLE AND BUILD_SHARED_LIBS)
ADD_LIBRARY(OTBVisu ${OTBVisu_SRCS})
TARGET_LINK_LIBRARIES (OTBVisu OTBGui OTBCommon ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBVisu PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)