Commit 6a503205 authored by Thomas Feuvrier's avatar Thomas Feuvrier

Mise a jour FLTK en interne. Ok pour régression : FLTK en externe fonctionne...

Mise a jour FLTK en interne. Ok pour régression : FLTK en externe fonctionne comme avant (c'est déjà pas mal ;-)
parent 3eee121e
......@@ -64,7 +64,7 @@ SET(OTB_VERSION_PATCH "0")
SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
#-----------------------------------------------------------------------------
# RECHERCHE DES LIBRAIRIES EXTERNES UTILISEES
# FIND EXTERNAL LIBRAIRIES USE
#-------------------------------
# Librairie ITK
......@@ -72,12 +72,12 @@ SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_
OPTION(OTB_USE_EXTERNAL_ITK "Use an outside build of ITK." OFF)
IF(OTB_USE_EXTERNAL_ITK)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
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.")
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
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)
ENDIF(OTB_USE_EXTERNAL_ITK)
......@@ -87,15 +87,16 @@ ENDIF(OTB_USE_EXTERNAL_ITK)
#-------------------------------
#FIND_LIBRARY(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_LIBRARY_DIRS} )
FIND_PATH(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_LIBRARY_DIRS} )
FIND_PATH(GDAL_INCLUDE_DIRS gdal.h $ENV{GDAL_INCLUDE_DIRS} /usr/include/gdal)
IF (NOT GDAL_LIBRARY_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find GDAL library directory. Please set GDAL_LIBRARY_DIRS.")
"Cannot find GDAL library directory. Please set GDAL_LIBRARY_DIRS.")
ENDIF (NOT GDAL_LIBRARY_DIRS)
IF (NOT GDAL_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find GDAL include directory. Please set GDAL_INCLUDE_DIRS.")
"Cannot find GDAL include directory. Please set GDAL_INCLUDE_DIRS.")
ENDIF (NOT GDAL_INCLUDE_DIRS)
......@@ -106,6 +107,7 @@ LINK_DIRECTORIES( ${GDAL_LIBRARY_DIRS} )
# Option for generate Visu tools !!!
OPTION(OTB_USE_VISU_GUI "Generate Gui/Visu tools directory. If ON, find OpenGL and FLTK package." ON)
MARK_AS_ADVANCED(OTB_USE_VISU_GUI)
IF(OTB_USE_VISU_GUI)
#-------------------------------
......@@ -119,40 +121,103 @@ IF(OTB_USE_VISU_GUI)
#-------------------------------
# Librairie FLTK
#-------------------------------
# Option for internal/external FLTK
OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON)
MARK_AS_ADVANCED(OTB_USE_EXTERNAL_FLTK)
# Add an option to use or not use FLTK (http://www.fltk.org)
# SET(CMAKE_MODULE_PATH "/usr/share/CMake")
# SET( FLTK_INCLUDE_DIR /usr/include )
FIND_PACKAGE(FLTK)
IF (NOT FLTK_INCLUDE_DIR)
SET( FLTK_INCLUDE_DIR /usr/include )
FIND_PACKAGE(FLTK)
ENDIF(NOT FLTK_INCLUDE_DIR)
IF(FLTK_FOUND)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
ELSE(FLTK_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build OTB project without FLTK. Please set FLTK_DIR or set OTB_USE_VISU to OFF.")
ENDIF(FLTK_FOUND)
#----------------------------------------------------------------
# RESUME Alls VISU GUI libraries use by OTB in a single VARIABLE
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
IF(OTB_USE_EXTERNAL_FLTK)
FIND_PACKAGE(FLTK)
IF (NOT FLTK_INCLUDE_DIR)
SET( FLTK_INCLUDE_DIR /usr/include )
FIND_PACKAGE(FLTK)
ENDIF(NOT FLTK_INCLUDE_DIR)
IF(FLTK_FOUND)
# IF(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
# MESSAGE(FATAL_ERROR "Impossible to find the file ${FLTK_BINARY_DIR}/FLTKConfig.cmake. You must generate FLTK with cmake process.")
# ELSE(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
# INCLUDE(${FLTK_BINARY_DIR}/FLTKConfig.cmake)
# ENDIF(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
# MESSAGE("FLUID_COMMAND -> ${FLUID_COMMAND}")
# MESSAGE("FLTK_BINARY_DIR -> ${FLTK_BINARY_DIR}")
# MESSAGE("FLTK_USE_FILE -> ${FLTK_USE_FILE}")
# MESSAGE("FLTK_INCLUDE_DIRS -> ${FLTK_INCLUDE_DIRS}")
# MESSAGE("FLTK_LIBRARY_DIRS -> ${FLTK_LIBRARY_DIRS}")
# MESSAGE("FLTK_LIBRARIES -> ${FLTK_LIBRARIES}")
# MESSAGE("FLTK_DIR -> ${FLTK_DIR}")
# MESSAGE("FLTK_FLUID_COMMAND -> ${FLTK_FLUID_COMMAND}")
# MESSAGE("FLTK_EXECUTABLE_DIRS -> ${FLTK_EXECUTABLE_DIRS}")
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
ELSE(FLTK_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build OTB project without FLTK. Please set FLTK_DIR or set OTB_USE_VISU to OFF or set OTB_USE_EXTERNAL_FLTK OFF to use INTERNAL FLTK set on OTB/Utilities repository.")
ENDIF(FLTK_FOUND)
#-----------------------------------------------------------------------------
# This lines come from FLTK CMakeLists.txt. We need the FLTK_PLATFORM_DEPENDENT_LIBS
# information, but this VAR is not include in the FLTKConfig.cmake.
IF(WIN32)
IF(NOT CYGWIN)
IF(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
ELSE(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
ENDIF(BORLAND)
ENDIF(NOT CYGWIN)
ENDIF(WIN32)
SET(FLTK_X11 1)
SET(FLTK_APPLE 0)
IF(APPLE)
OPTION(FLTK_APPLE_X11 "Use X11 on Mac instead of Carbon" OFF)
MARK_AS_ADVANCED(FLTK_APPLE_X11)
IF(NOT FLTK_APPLE_X11)
SET(FLTK_APPLE 1)
SET(FLTK_X11 0)
ENDIF(NOT FLTK_APPLE_X11)
ENDIF(APPLE)
IF(UNIX)
FIND_PACKAGE(X11)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
ENDIF(UNIX)
IF(APPLE AND NOT FLTK_APPLE_X11)
SET( FLTK_PLATFORM_DEPENDENT_LIBS
"-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
ENDIF(APPLE AND NOT FLTK_APPLE_X11)
IF(CYGWIN)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
ENDIF(CYGWIN)
IF(MINGW)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid wsock32 gdi32 comdlg32)
ENDIF(MINGW)
#----------------------------------------------------------------
# RESUME Alls VISU GUI libraries use by OTB in a single VARIABLE
# SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES} ${OTB_VISU_GUI_LIBRARIES}")
# SET(OTB_FLTK_FLUID_EXECUTABLE "${FLTK_FLUID_EXECUTABLE}")
# SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
ENDIF(OTB_USE_EXTERNAL_FLTK)
#----------------------------------------------------------------
# ADD Specifics mingw lib
IF(MINGW)
SET(OTB_VISU_GUI_LIBRARIES "${OTB_VISU_GUI_LIBRARIES};ole32;uuid;wsock32;gdi32;comdlg32;shell32") # wininet dsound gdi32 vfw32
ENDIF(MINGW)
ELSE(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "")
# IF(MINGW)
# SET(OTB_VISU_GUI_LIBRARIES "${OTB_VISU_GUI_LIBRARIES};ole32;uuid;wsock32;gdi32;comdlg32;shell32") # wininet dsound gdi32 vfw32
# ENDIF(MINGW)
ENDIF(OTB_USE_VISU_GUI)
#-------------------------------
# End connections whith external libraries
#-------------------------------
......@@ -353,6 +418,7 @@ IF (BUILD_TESTING)
SUBDIRS(Testing)
ENDIF (BUILD_TESTING)
#-----------------------------------------------------------------------------
# OTB requires special compiler flags on some platforms.
IF(CMAKE_COMPILER_IS_GNUCXX)
......@@ -574,6 +640,12 @@ INCLUDE_DIRECTORIES(
${OTB_INCLUDE_DIRS_SYSTEM}
)
IF(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES};${FLTK_PLATFORM_DEPENDENT_LIBS}")
ELSE(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "")
ENDIF(OTB_USE_VISU_GUI)
#-----------------------------------------------------------------------------
# Uninstall cmake use to uninstall OTB.
CONFIGURE_FILE(
......@@ -643,7 +715,3 @@ ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.7)
"Please upgrade to CMake 1.8.")
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.7)
# Set the FLTK and OpenGL libraries use by OTB
......@@ -63,7 +63,20 @@ SET(OTB_USE_SYSTEM_VXL "@OTB_USE_SYSTEM_VXL@")
# The VXL_DIR setting used to build OTB. Set if OTB_USE_SYSTEM_VXL is true.
SET(OTB_VXL_DIR "@OTB_VXL_DIR@")
SET(OTB_FLTK_FLUID_EXECUTABLE "@FLTK_FLUID_EXECUTABLE@")
SET(OTB_ITK_DIR "@ITK_DIR@")
SET(OTB_VISU_GUI_LIBRARIES "@OTB_VISU_GUI_LIBRARIES@")
# FLTK informations
SET(FLTK_FLUID_EXECUTABLE "@FLUID_COMMAND@")
#SET(FLTK_BINARY_DIR "@FLTK_BINARY_DIR@")
SET(FLTK_LIBRARY_DIRS "@FLTK_LIBRARY_DIRS@")
SET(FLTK_LIBRARIES "@FLTK_LIBRARIES@")
SET(OPENGL_LIBRARIES "@OPENGL_LIBRARIES@")
SET(FLTK_EXECUTABLE_DIRS "@FLTK_EXECUTABLE_DIRS@")
SET(FLUID_COMMAND "@FLUID_COMMAND@")
SET(FLTK_PLATFORM_DEPENDENT_LIBS "@FLTK_PLATFORM_DEPENDENT_LIBS@")
# The OTB Visu Gui informations
SET(OTB_USE_VISU_GUI "@OTB_USE_VISU_GUI@")
SET(OTB_VISU_GUI_LIBRARIES "@FLTK_LIBRARIES@;@OPENGL_LIBRARIES@;@FLTK_PLATFORM_DEPENDENT_LIBS@")
......@@ -159,7 +159,7 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbVisuTests1 otbVisuTests1.cxx ${BasicVisu_SRCS1})
TARGET_LINK_LIBRARIES(otbVisuTests1 OTBVisu OTBGui OTBIO gdal ITKIO ITKCommon ${OTB_VISU_GUI_LIBRARIES} )
ADD_EXECUTABLE(otbVisuTests2 otbVisuTests2.cxx ${BasicVisu_SRCS2})
TARGET_LINK_LIBRARIES(otbVisuTests2 OTBVisu OTBGui OTBIO gdal ITKIO ITKCommon)
TARGET_LINK_LIBRARIES(otbVisuTests2 OTBVisu OTBGui OTBIO gdal ITKIO ITKCommon ${OTB_VISU_GUI_LIBRARIES} )
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
......
......@@ -67,7 +67,6 @@ IF(OTB_USE_SYSTEM_VXL)
ENDIF(VXL_FOUND)
ENDIF(OTB_USE_SYSTEM_VXL)
SET(FLTK_FLUID_EXECUTABLE ${OTB_FLTK_FLUID_EXECUTABLE})
#WHERE TO FIND ITK
IF(OTB_USE_EXTERNAL_ITK)
INCLUDE(${OTB_ITK_DIR}/ITKConfig.cmake)
......
# $Id$
#-----------------------------------------------------------------------------
# Include directories for other projects installed on the system.
SET(OTB_INCLUDE_DIRS_SYSTEM "")
#-----------------------------------------------------------------------------
# Include directories from the build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_BINARY_DIR})
# These directories are always needed.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Code/Common
${OTB_SOURCE_DIR}/Code/BasicFilters
${OTB_SOURCE_DIR}/Code/IO
${OTB_SOURCE_DIR}/Code/ChangeDetection
${OTB_SOURCE_DIR}/Code/FeatureExtraction
${OTB_SOURCE_DIR}/Code/Learning
${OTB_SOURCE_DIR}/Code/MultiScale
${OTB_SOURCE_DIR}/Code/SpatialReasoning
${OTB_SOURCE_DIR}/Code/DisparityMap
${OTB_SOURCE_DIR}/Code/Visu
${OTB_SOURCE_DIR}/Code/Gui
${OTB_SOURCE_DIR}/Code/Fusion
${OTB_SOURCE_DIR}/Code/Projections
${OTB_SOURCE_DIR}/Code/Radiometry
${OTB_SOURCE_DIR}/Code/Markov
${OTB_SOURCE_DIR}/Utilities/BGL
${OTB_SOURCE_DIR}/Utilities/BGL/boost
${OTB_SOURCE_DIR}/Utilities/otbsvm
${OTB_SOURCE_DIR}/Utilities/otbossim
${OTB_SOURCE_DIR}/Utilities/otbossim/include
${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim
${OTB_SOURCE_DIR}/Utilities/dxflib
${OTB_SOURCE_DIR}/Utilities/InsightJournal
${OTB_SOURCE_DIR}/Utilities/otb6S
${OTB_SOURCE_DIR}/Utilities/otbgeotiff
${OTB_SOURCE_DIR}/Utilities/otbgeotiff/libxtiff
)
#-----------------------------------------------------------------------------
# Include directories from the ossim build tree
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_BINARY_DIR}/Utilities/otbossim/include
)
#-----------------------------------------------------------------------------
# Include directories from the GDAL build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIRS} )
#-----------------------------------------------------------------------------
# Include directories from the ITK build tree.e
IF(OTB_USE_EXTERNAL_ITK)
# INCLUDE(${ITK_SOURCE_DIR}/Utilities/itkThirdParty.cmake)
# INCLUDE(${ITK_SOURCE_DIR}/itkIncludeDirectories.cmake)
# SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
# ${ITK_SOURCE_DIR}/Utilities/vxl/v3p/netlib
# ${ITK_SOURCE_DIR}/Utilities/vxl/v3p/netlib/opt)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${ITK_INCLUDE_DIRS} )
ELSE(OTB_USE_EXTERNAL_ITK)
IF(NOT ITK_INSTALL_INCLUDE_DIR)
SET(ITK_INSTALL_INCLUDE_DIR "/include/otb/Utilities/ITK")
ENDIF(NOT ITK_INSTALL_INCLUDE_DIR)
INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/itkThirdParty.cmake)
INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/itkIncludeDirectories.cmake)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib
${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib/opt)
ENDIF(OTB_USE_EXTERNAL_ITK)
#-----------------------------------------------------------------------------
# Include directories needed for .cxx files in OTB. These include
# directories will NOT be available to user projects.
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} )
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${GDAL_INCLUDE_DIRS} ${FLTK_INCLUDE_DIRS} )
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${ITK_INCLUDE_DIRS} )
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
ELSE(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${ITK_INCLUDE_DIRS_BUILD_TREE}
${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
ENDIF(OTB_USE_EXTERNAL_ITK)
#-----------------------------------------------------------------------------
# Include directories from the install tree.
SET(OTB_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/otb")
SET(OTB_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
SET(OTB_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/otb")
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${OTB_INSTALL_INCLUDE_DIR}
${OTB_INSTALL_INCLUDE_DIR}/Common
${OTB_INSTALL_INCLUDE_DIR}/BasicFilters
${OTB_INSTALL_INCLUDE_DIR}/IO
${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection
${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
${OTB_INSTALL_INCLUDE_DIR}/Learning
${OTB_INSTALL_INCLUDE_DIR}/MultiScale
${OTB_INSTALL_INCLUDE_DIR}/SpatialReasoning
${OTB_INSTALL_INCLUDE_DIR}/DisparityMap
${OTB_INSTALL_INCLUDE_DIR}/Visu
${OTB_INSTALL_INCLUDE_DIR}/Gui
${OTB_INSTALL_INCLUDE_DIR}/Projections
${OTB_INSTALL_INCLUDE_DIR}/Radiometry
${OTB_INSTALL_INCLUDE_DIR}/Markov
${OTB_INSTALL_INCLUDE_DIR}/Utilities
${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK
${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL
${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL/boost
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbsvm
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim/include
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim/include/ossim
${OTB_INSTALL_INCLUDE_DIR}/Utilities/InsightJournal
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otb6S
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbgeotiff
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbgeotiff/libxtiff
)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${GDAL_INCLUDE_DIRS} ${FLTK_INCLUDE_DIRS})
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${ITK_INCLUDE_DIRS} )
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
ELSE(OTB_USE_EXTERNAL_ITK)
#THOMAS
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${ITK_INCLUDE_DIRS_INSTALL_TREE} )
# ${ITK_INCLUDE_DIRS_BUILD_TREE}
# ${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
ENDIF(OTB_USE_EXTERNAL_ITK)
# $Id$
#-----------------------------------------------------------------------------
# Include directories for other projects installed on the system.
SET(OTB_INCLUDE_DIRS_SYSTEM "")
#-----------------------------------------------------------------------------
# Include directories from the build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_BINARY_DIR})
# These directories are always needed.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Code/Common
${OTB_SOURCE_DIR}/Code/BasicFilters
${OTB_SOURCE_DIR}/Code/IO
${OTB_SOURCE_DIR}/Code/ChangeDetection
${OTB_SOURCE_DIR}/Code/FeatureExtraction
${OTB_SOURCE_DIR}/Code/Learning
${OTB_SOURCE_DIR}/Code/MultiScale
${OTB_SOURCE_DIR}/Code/SpatialReasoning
${OTB_SOURCE_DIR}/Code/DisparityMap
${OTB_SOURCE_DIR}/Code/Visu
${OTB_SOURCE_DIR}/Code/Gui
${OTB_SOURCE_DIR}/Code/Fusion
${OTB_SOURCE_DIR}/Code/Projections
${OTB_SOURCE_DIR}/Code/Radiometry
${OTB_SOURCE_DIR}/Code/Markov
${OTB_SOURCE_DIR}/Utilities/BGL
${OTB_SOURCE_DIR}/Utilities/BGL/boost
${OTB_SOURCE_DIR}/Utilities/otbsvm
${OTB_SOURCE_DIR}/Utilities/otbossim
${OTB_SOURCE_DIR}/Utilities/otbossim/include
${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim
${OTB_SOURCE_DIR}/Utilities/dxflib
${OTB_SOURCE_DIR}/Utilities/InsightJournal
${OTB_SOURCE_DIR}/Utilities/otb6S
${OTB_SOURCE_DIR}/Utilities/otbgeotiff
${OTB_SOURCE_DIR}/Utilities/otbgeotiff/libxtiff
)
#-----------------------------------------------------------------------------
# Include directories from the ossim build tree
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_BINARY_DIR}/Utilities/otbossim/include
)
#-----------------------------------------------------------------------------
# Include directories from the GDAL build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIRS} )
#-----------------------------------------------------------------------------
# Include directories from the ITK build tree.
IF(OTB_USE_EXTERNAL_ITK)
# INCLUDE(${ITK_SOURCE_DIR}/Utilities/itkThirdParty.cmake)
# INCLUDE(${ITK_SOURCE_DIR}/itkIncludeDirectories.cmake)
# SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
# ${ITK_SOURCE_DIR}/Utilities/vxl/v3p/netlib
# ${ITK_SOURCE_DIR}/Utilities/vxl/v3p/netlib/opt)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${ITK_INCLUDE_DIRS} )
ELSE(OTB_USE_EXTERNAL_ITK)
IF(NOT ITK_INSTALL_INCLUDE_DIR)
SET(ITK_INSTALL_INCLUDE_DIR "/include/otb/Utilities/ITK")
ENDIF(NOT ITK_INSTALL_INCLUDE_DIR)
INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/itkThirdParty.cmake)
INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/itkIncludeDirectories.cmake)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib
${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib/opt)
ENDIF(OTB_USE_EXTERNAL_ITK)
#-----------------------------------------------------------------------------
# Include directories needed for .cxx files in OTB. These include
# directories will NOT be available to user projects.
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} )
#-----------------------------------------------------------------------------
# Include FLTK variables.
#IF(OTB_USE_EXTERNAL_FLTK)
# IF(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
# MESSAGE(FATAL_ERROR "Impossible to find the file ${FLTK_BINARY_DIR}/FLTKConfig.cmake. You must generate FLTK with cmake process.")
# ELSE(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
# INCLUDE(${FLTK_BINARY_DIR}/FLTKConfig.cmake)
# ENDIF(NOT EXISTS "${FLTK_BINARY_DIR}/FLTKConfig.cmake")
#ELSE(OTB_USE_EXTERNAL_FLTK)
# IF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
# INCLUDE(${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake)
# ENDIF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
#ENDIF(OTB_USE_EXTERNAL_FLTK)
#-----------------------------------------------------------------------------
# Include directories from the FLTK build tree.
IF(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${FLTK_INCLUDE_DIRS} )
ELSE(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${OTB_SOURCE_DIR}/Utilities/FLTK
${OTB_SOURCE_DIR}/Utilities/FLTK/src
${OTB_BINARY_DIR}/Utilities/FLTK )
ENDIF(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${GDAL_INCLUDE_DIRS} )
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${ITK_INCLUDE_DIRS} )
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
ELSE(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${ITK_INCLUDE_DIRS_BUILD_TREE}
${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
ENDIF(OTB_USE_EXTERNAL_ITK)
#-----------------------------------------------------------------------------
# Include directories from the install tree.
SET(OTB_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/otb")
SET(OTB_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
SET(OTB_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/otb")
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${OTB_INSTALL_INCLUDE_DIR}
${OTB_INSTALL_INCLUDE_DIR}/Common
${OTB_INSTALL_INCLUDE_DIR}/BasicFilters
${OTB_INSTALL_INCLUDE_DIR}/IO
${OTB_INSTALL_INCLUDE_DIR}/ChangeDetection
${OTB_INSTALL_INCLUDE_DIR}/FeatureExtraction
${OTB_INSTALL_INCLUDE_DIR}/Learning
${OTB_INSTALL_INCLUDE_DIR}/MultiScale
${OTB_INSTALL_INCLUDE_DIR}/SpatialReasoning
${OTB_INSTALL_INCLUDE_DIR}/DisparityMap
${OTB_INSTALL_INCLUDE_DIR}/Visu
${OTB_INSTALL_INCLUDE_DIR}/Gui
${OTB_INSTALL_INCLUDE_DIR}/Projections
${OTB_INSTALL_INCLUDE_DIR}/Radiometry
${OTB_INSTALL_INCLUDE_DIR}/Markov
${OTB_INSTALL_INCLUDE_DIR}/Utilities
${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK
${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL
${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL/boost
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbsvm
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim/include
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim/include/ossim
${OTB_INSTALL_INCLUDE_DIR}/Utilities/InsightJournal
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otb6S
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbgeotiff
${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbgeotiff/libxtiff
)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${GDAL_INCLUDE_DIRS} )
IF(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${FLTK_INCLUDE_DIRS})
ELSE(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${OTB_INSTALL_INCLUDE_DIR}/Utilities/FLTK)
ENDIF(OTB_USE_EXTERNAL_FLTK)
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${ITK_INCLUDE_DIRS} )
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
ELSE(OTB_USE_EXTERNAL_ITK)
#THOMAS
SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${ITK_INCLUDE_DIRS_INSTALL_TREE} )
# ${ITK_INCLUDE_DIRS_BUILD_TREE}
# ${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
ENDIF(OTB_USE_EXTERNAL_ITK)
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