Commit 75807839 authored by Thomas Feuvrier's avatar Thomas Feuvrier

ENH: Improve set includes paths for install tree

parent 8e229a69
......@@ -199,7 +199,7 @@ ELSE(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
INCLUDE(${OTB_SOURCE_DIR}/FindOpenThreads.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
SET(OTB_USE_EXTERNAL_OPENTHREADS 1)
SET(OTB_USE_EXTERNAL_OPENTHREADS 1 CACHE INTERNAL "")
IF(OPENTHREADS_FOUND)
INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR})
LINK_DIRECTORIES( ${OPENTHREADS_LIBRARY} )
......
......@@ -70,6 +70,10 @@ IF(OTB_INCLUDE_DIRS_SYSTEM)
LIST(APPEND OTB_INCLUDE_DIRS_CONFIG ${OTB_INCLUDE_DIRS_SYSTEM})
ENDIF(OTB_INCLUDE_DIRS_SYSTEM)
# Add absolue includes paths
SET(OTB_INCLUDE_DIRS_CONFIG ${OTB_INCLUDE_DIRS_CONFIG}
${OTB_INCLUDE_ABSOLUE_DIRS} )
# Include directories.
# SET(OTB_INCLUDE_DIRS_CONFIG
# ${OTB_INCLUDE_DIRS_INSTALL_TREE}
......
......@@ -192,6 +192,7 @@ ENDIF(OTB_USE_EXTERNAL_ITK)
#-----------------------------------------------------------------------------
# Include directories from the install tree.
# Alls install dirs must been RELATIVE PATH, except for the external libraries, specify by the ABSOLUE PATH
SET(OTB_INSTALL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}${OTB_INSTALL_INCLUDE_DIR}")
# SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS} )
......@@ -199,10 +200,12 @@ SET(OTB_INSTALL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}${OTB_INSTALL_INCLUDE_DIR}"
# SET(OTB_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
# SET(OTB_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/otb")
SET(OTB_INCLUDE_RELATIVE_DIRS )
SET(OTB_INCLUDE_ABSOLUE_DIRS )
#For BOOST header file
IF(OTB_USE_EXTERNAL_BOOST)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${Boost_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_BOOST)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
......@@ -258,12 +261,12 @@ IF(OTB_COMPILE_JPEG2000)
ENDIF(OTB_COMPILE_JPEG2000)
#For GDAL header file
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${GDAL_INCLUDE_DIRS} )
#For EXPAT header file
IF(OTB_USE_EXTERNAL_EXPAT)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${EXPAT_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_EXPAT)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
......@@ -272,19 +275,23 @@ ENDIF(OTB_USE_EXTERNAL_EXPAT)
#For CURL header file
IF(OTB_USE_CURL)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${CURL_INCLUDE_DIR} )
ENDIF(OTB_USE_CURL)
# For OpentTreads header file
IF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
IF(OTB_USE_EXTERNAL_OPENTHREADS)
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${OPENTHREADS_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_OPENTHREADS)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
Utilities/otbopenthreads/OpenThreads/include)
ENDIF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
ENDIF(OTB_USE_EXTERNAL_OPENTHREADS)
#For FLTK header file
IF(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${FLTK_INCLUDE_DIRS})
ELSE(OTB_USE_EXTERNAL_FLTK)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
......@@ -292,12 +299,12 @@ ELSE(OTB_USE_EXTERNAL_FLTK)
ENDIF(OTB_USE_EXTERNAL_FLTK)
#For GLU header file
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${OTB_GLU_INCLUDE_PATH} )
#For ITK header file
IF(OTB_USE_EXTERNAL_ITK)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${ITK_INCLUDE_DIRS} )
# ${ITK_INCLUDE_DIRS_INSTALL_TREE} )
ELSE(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