Commit 4047b6f4 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Nettoyage des fichiers CMakeLists.txt et *.cmake suite aux modifications pour le make install.

parent 451588b1
......@@ -58,17 +58,6 @@ SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}")
#-----------------------------------------------------------------------------
# RECHERCHE DES LIBRAIRIES EXTERNES UTILISEES
#-------------------------------
# Librairie VTK
#-------------------------------
# FIND_PACKAGE(VTK)
# IF(VTK_FOUND)
# INCLUDE(${VTK_USE_FILE})
# ELSE(VTK_FOUND)
# MESSAGE(FATAL_ERROR
# "Cannot build OTB project without VTK. Please set VTK_DIR.")
# ENDIF(VTK_FOUND)
#-------------------------------
# Librairie OpenGL
#-------------------------------
......@@ -82,7 +71,6 @@ ENDIF(OPENGL_INCLUDE_PATH)
#-------------------------------
OPTION(OTB_USE_EXTERNAL_ITK "Use an outside build of ITK." ON)
# MARK_AS_ADVANCED(OTB_USE_EXTERNAL_ITK)
IF(OTB_USE_EXTERNAL_ITK)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
......@@ -91,35 +79,22 @@ IF(OTB_USE_EXTERNAL_ITK)
MESSAGE(FATAL_ERROR
"Cannot build OTB project without ITK. Please set ITK_DIR or set OTB_USE_EXTERNAL_ITK OFF to use INTERNAL ITK set on OTB/Utilities repository.")
ENDIF(ITK_FOUND)
ELSE(OTB_USE_EXTERNAL_ITK)
#THOMAS
# SET(ITK_SOURCE_DIR ${OTB_SOURCE_DIR}/Utilities/ITK)
# SET(ITK_BINARY_DIR ${OTB_BINARY_DIR})
ENDIF(OTB_USE_EXTERNAL_ITK)
#-------------------------------
# Librairie GDAL
#-------------------------------
# OPTION(OTB_USE_EXTERNAL_GDAL "Use an outside build of GDAL." ON)
# MARK_AS_ADVANCED(OTB_USE_EXTERNAL_GDAL)
# IF(OTB_USE_EXTERNAL_GDAL)
FIND_PATH(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_DIR_LIB} )
FIND_PATH(GDAL_INCLUDE_DIRS gdal.h $ENV{GDAL_DIR_INCLUDES} )
IF (NOT GDAL_LIBRARY_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find GDAL library. Please set GDAL_LIBRARY_DIRS and GDAL_INCLUDE_DIRS.")
ENDIF (NOT GDAL_LIBRARY_DIRS)
#THOMAS !!!
# FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS $ENV{GDAL_DIR_LIB} )
FIND_PATH(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_DIR_LIB} )
FIND_PATH(GDAL_INCLUDE_DIRS gdal.h $ENV{GDAL_DIR_INCLUDES} )
IF (NOT GDAL_LIBRARY_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find GDAL library. Please set GDAL_LIBRARY_DIRS and GDAL_INCLUDE_DIRS.")
ENDIF (NOT GDAL_LIBRARY_DIRS)
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIRS})
#THOMAS
# LINK_DIRECTORIES( $ENV{GDAL_DIR_LIB} )
LINK_DIRECTORIES( ${GDAL_LIBRARY_DIRS} )
# ENDIF(OTB_USE_EXTERNAL_GDAL)
LINK_DIRECTORIES( ${GDAL_LIBRARY_DIRS} )
#-------------------------------
......@@ -133,7 +108,7 @@ IF(FLTK_FOUND)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ELSE(FLTK_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build OTB project without FLTK. Please set FLTK_DIR or set OTB_USE_EXTERNAL_FLTK OFF to use INTERNAL FLTK set on OTB/Utilities repository.")
"Cannot build OTB project without FLTK. Please set FLTK_DIR.")
ENDIF(FLTK_FOUND)
#-------------------------------
......@@ -186,36 +161,12 @@ ELSE(APPLE AND NOT FLTK_USE_X)
ENDIF(APPLE AND NOT FLTK_USE_X)
#FIND_LIBRARY(FLTK_LIBRARY NAMES fltk PATHS /ORFEO/outils/libs-externes-install/lib/fltk )
#FIND_PATH(FLTK_INCLUDES Fl.H /ORFEO/outils/libs-externes-install/include/FL )
#FIND_LIBRARY(CAI_LIBRARY NAMES cai PATHS ${CAI_DIR_LIB} )
#FIND_PATH(CAI_INCLUDES cai_image.h ${CAI_DIR_INCLUDES} )
#IF (NOT FLTK_LIBRARY)
# MESSAGE(FATAL_ERROR
# "Cannot find FLTK library. Please set FLTK_DIR_LIB.")
#ENDIF (NOT FLTK_LIBRARY)
#INCLUDE_DIRECTORIES(${FLTK_INCLUDES})
#LINK_DIRECTORIES( $ENV{FLTK_DIR_LIB} )
#ROMAIN
INCLUDE_DIRECTORIES (
${OTB_BINARY_DIR}
${OTB_SOURCE_DIR}
#THOMAS
# $ENV{GDAL_DIR_LIB}
# $ENV{GDAL_DIR_INCLUDES}
)
INCLUDE_DIRECTORIES( ${OTB_INCLUDE_DIRS} )
#INCLUDE_DIRECTORIES( ${OTB_SOURCE_DIR}/library )
#INCLUDE_DIRECTORIES( ${OTB_SOURCE_DIR}/tools )
#LINK_DIRECTORIES( ${OTB_LIBRARY_DIRS} )
#Includes pour les Utilities (/Utilities)
INCLUDE_DIRECTORIES (
# ${OTB_SOURCE_DIR}/Utils/FltkImageViewer
)
#-----------------------------------------------------------------------------
......@@ -246,10 +197,6 @@ ENDIF(BUILD_TESTING)
# Output directories.
#SET (LIBRARY_OUTPUT_PATH ${OTB_BINARY_DIR}/bin CACHE INTERNAL "Les librairies sont generees dans le m�e repertoire.")
#SET (EXECUTABLE_OUTPUT_PATH ${OTB_BINARY_DIR}/bin CACHE INTERNAL "Les executables sont generes dans le m�e repertoire.")
#ROMAIN
IF(NOT LIBRARY_OUTPUT_PATH)
SET (LIBRARY_OUTPUT_PATH ${OTB_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(NOT LIBRARY_OUTPUT_PATH)
......@@ -269,9 +216,8 @@ ENDIF(NOT OTB_NO_LIBRARY_VERSION)
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
#THOMAS
SET(OTB_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}")
# SET(OTB_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}" $ENV{GDAL_DIR_LIB} ${ITK_LIBRARY_DIRS})
SET(OTB_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}")
SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
......
......@@ -4,11 +4,6 @@ IF(NOT OTB_USE_EXTERNAL_ITK)
SUBDIRS( ITK )
ENDIF(NOT OTB_USE_EXTERNAL_ITK)
#IF(NOT OTB_USE_EXTERNAL_GDAL)
# SUBDIRS( GDAL )
#ENDIF(NOT OTB_USE_EXTERNAL_GDAL)
#THOMAS - 4 juillet 2006
#-----------------------------------------------------------------------------
# Install the UseOTB.cmake file configured from the top-level.
INSTALL_FILES(/lib/otb ".cmake" "OTBConfig")
......@@ -18,13 +18,11 @@ SET(OTB_BUILD_SETTINGS_FILE ${OTB_BINARY_DIR}/OTBBuildSettings.cmake)
SET(OTB_LIBRARY_DIRS_CONFIG ${OTB_LIBRARY_PATH})
# THOMAS
SET(OTB_LIBRARY_DIRS_CONFIG ${OTB_LIBRARY_DIRS_CONFIG} ${GDAL_LIBRARY_DIRS} ${ITK_LIBRARY_DIRS} )
# Determine the include directories needed.
SET(OTB_INCLUDE_DIRS_CONFIG
${OTB_INCLUDE_DIRS_BUILD_TREE}
#THOMAS
${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${OTB_INCLUDE_DIRS_SYSTEM}
)
......@@ -57,11 +55,9 @@ SET(OTB_INCLUDE_DIRS_CONFIG
# Link directories.
SET(OTB_LIBRARY_DIRS_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/otb)
#THOMAS
SET(OTB_LIBRARY_DIRS_CONFIG ${OTB_LIBRARY_DIRS_CONFIG} ${GDAL_LIBRARY_DIRS} ${ITK_LIBRARY_DIRS} )
#-----------------------------------------------------------------------------
# Configure OTBConfig.cmake for the install tree.
#THOMAS
CONFIGURE_FILE(${OTB_SOURCE_DIR}/OTBConfig.cmake.in
${OTB_BINARY_DIR}/Utilities/OTBConfig.cmake @ONLY IMMEDIATE)
......@@ -20,24 +20,11 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
#-----------------------------------------------------------------------------
# Include directories from the GDAL build tree.
# IF(NOT OTB_USE_EXTERNAL_GDAL)
# INCLUDE(${OTB_SOURCE_DIR}/Utilities/GDAL/gdalIncludeDirectories.cmake)
# SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
# ${GDAL_INCLUDE_DIRS_BUILD_TREE}
# )
# ENDIF(NOT OTB_USE_EXTERNAL_GDAL)
# $ENV{GDAL_DIR_LIB}
#THOMAS
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIRS} )
#-----------------------------------------------------------------------------
# Include directories from the ITK build tree.e
#THOMAS
IF(OTB_USE_EXTERNAL_ITK)
INCLUDE(${ITK_SOURCE_DIR}/Utilities/itkThirdParty.cmake)
INCLUDE(${ITK_SOURCE_DIR}/itkIncludeDirectories.cmake)
......@@ -53,11 +40,9 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} )
#THOMAS
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${GDAL_INCLUDE_DIRS} )
#THOMAS
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${ITK_INCLUDE_DIRS} )
......@@ -82,17 +67,11 @@ SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${OTB_INSTALL_INCLUDE_DIR}/Visu
${OTB_INSTALL_INCLUDE_DIR}/Utilities
${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK
#THOMAS
# ${ITK_INSTALL_INCLUDE_DIR}
# ${ITK_INCLUDE_DIRS}
)
#THOMAS
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${GDAL_INCLUDE_DIRS} )
#THOMAS
#THOMAS
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${ITK_INCLUDE_DIRS} )
......@@ -102,22 +81,3 @@ ELSE(OTB_USE_EXTERNAL_ITK)
${ITK_INCLUDE_DIRS_BUILD_TREE}
${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
ENDIF(OTB_USE_EXTERNAL_ITK)
#SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
# ${ITK_INCLUDE_DIRS} )
#IF(NOT OTB_USE_SYSTEM_VXL)
# SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
# ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/vcl
# ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/core
# )
#ENDIF(NOT OTB_USE_SYSTEM_VXL)
#-----------------------------------------------------------------------------
# Include directories for 3rd-party utilities provided by OTB.
#OTB_THIRD_PARTY_INCLUDE(ZLIB zlib)
#OTB_THIRD_PARTY_INCLUDE(PNG png)
#OTB_THIRD_PARTY_INCLUDE(TIFF tiff)
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