Commit 5db0cec3 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Mise en place de GDAL dans l'arborescence Utilities de l'OTB

parent 51c9313e
......@@ -23,13 +23,13 @@ SET(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}")
#-------------------------------
# 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)
# 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 ITK
......@@ -79,15 +79,15 @@ ENDIF(OPENGL_INCLUDE_PATH)
#-------------------------------
# Librairie GDAL
#-------------------------------
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS $ENV{GDAL_DIR_LIB} )
FIND_PATH(GDAL_INCLUDES gdal.h $ENV{GDAL_DIR_INCLUDES} )
IF (NOT GDAL_LIBRARY)
MESSAGE(FATAL_ERROR
"Cannot find GDAL library. Please set GDAL_DIR_LIB.")
ENDIF (NOT GDAL_LIBRARY)
# FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS $ENV{GDAL_DIR_LIB} )
# FIND_PATH(GDAL_INCLUDES gdal.h $ENV{GDAL_DIR_INCLUDES} )
# IF (NOT GDAL_LIBRARY)
# MESSAGE(FATAL_ERROR
# "Cannot find GDAL library. Please set GDAL_DIR_LIB.")
# ENDIF (NOT GDAL_LIBRARY)
INCLUDE_DIRECTORIES(${GDAL_INCLUDES})
LINK_DIRECTORIES( $ENV{GDAL_DIR_LIB} )
# INCLUDE_DIRECTORIES(${GDAL_INCLUDES})
# LINK_DIRECTORIES( $ENV{GDAL_DIR_LIB} )
#-------------------------------
......@@ -463,6 +463,7 @@ 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 )
......
......@@ -43,7 +43,7 @@ SET(OTB_CableSwig_DIR "@OTB_CableSwig_DIR_CONFIG@")
# A list of all libraries for OTB. Those listed here should
# automatically pull in their dependencies.
SET(OTB_LIBRARIES OTBAlgorithms OTBStatistics OTBFEM)
# SET(OTB_LIBRARIES OTBAlgorithms OTBStatistics OTBFEM)
# The OTB library dependencies.
IF(NOT OTB_NO_LIBRARY_DEPENDS)
......
......@@ -19,36 +19,21 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
)
#-----------------------------------------------------------------------------
# CAI directories
IF(WIN32)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/CAI/cai_dll
${OTB_SOURCE_DIR}/Utilities/CAI/cai_dll/inc
${OTB_SOURCE_DIR}/Utilities/CAI/cai_dll/inc/inc_unix2win
)
ELSE(WIN32)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/CAI
${OTB_SOURCE_DIR}/Utilities/CAI/inc
)
ENDIF(WIN32)
# Include directories from the GDAL build tree.
INCLUDE(${OTB_SOURCE_DIR}/Utilities/GDAL/gdalIncludeDirectories.cmake)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIRS_BUILD_TREE}
)
#-----------------------------------------------------------------------------
# Include directories from the CAI build tree.
INCLUDE(${OTB_SOURCE_DIR}/Utilities/CAI/caiIncludeDirectories.cmake)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/raw
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/gtiff/libgeotiff
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/gtiff/libtiff
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/gtiff
# ${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/ceos
# ${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/envisat
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/msg
${OTB_SOURCE_DIR}/Utilities/GDAL/frmts/msg/PublicDecompWT/COMP/WT/Inc
${OTB_SOURCE_DIR}/Utilities/GDAL/gcore
${OTB_SOURCE_DIR}/Utilities/GDAL/ogr
${OTB_SOURCE_DIR}/Utilities/GDAL/ogr/ogrsf_frmts
${OTB_SOURCE_DIR}/Utilities/GDAL/port
${OTB_SOURCE_DIR}/Utilities/GDAL/alg
)
${CAI_INCLUDE_DIRS_BUILD_TREE}
)
#-----------------------------------------------------------------------------
......@@ -75,6 +60,7 @@ SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
${OTB_INSTALL_INCLUDE_DIR}/Utilities/GDAL
)
#IF(NOT OTB_USE_SYSTEM_VXL)
# SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
# ${OTB_INSTALL_INCLUDE_DIR}/Utilities/vxl/vcl
......
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