otbIncludeDirectories.cmake 12.3 KB
Newer Older
1 2 3 4 5 6 7 8 9
# $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})

Emmanuel Christophe's avatar
Emmanuel Christophe committed
10 11 12 13 14 15 16 17

# Include directories from the Boost build tree.
IF(OTB_USE_EXTERNAL_BOOST)
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
  	${Boost_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_BOOST)
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
    ${OTB_SOURCE_DIR}/Utilities/BGL
18 19
    ${OTB_SOURCE_DIR}/Utilities/BGL/boost
)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
20 21
ENDIF(OTB_USE_EXTERNAL_BOOST)

22 23


24 25 26 27 28 29 30 31 32 33 34 35
# 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
36
  ${OTB_SOURCE_DIR}/Code/Visualization
37 38 39 40
  ${OTB_SOURCE_DIR}/Code/Gui
  ${OTB_SOURCE_DIR}/Code/Fusion
  ${OTB_SOURCE_DIR}/Code/Projections
  ${OTB_SOURCE_DIR}/Code/Radiometry
41
  ${OTB_SOURCE_DIR}/Code/SARPolarimetry
42 43 44 45 46
  ${OTB_SOURCE_DIR}/Code/Markov
  ${OTB_SOURCE_DIR}/Utilities/otbsvm
  ${OTB_SOURCE_DIR}/Utilities/otbossim
  ${OTB_SOURCE_DIR}/Utilities/otbossim/include
  ${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim
47
  ${OTB_SOURCE_DIR}/Utilities/otbossimplugins
48 49 50
  ${OTB_SOURCE_DIR}/Utilities/dxflib
  ${OTB_SOURCE_DIR}/Utilities/InsightJournal
  ${OTB_SOURCE_DIR}/Utilities/otb6S
51
  ${OTB_SOURCE_DIR}/Utilities/tinyXMLlib
52
#  ${OTB_SOURCE_DIR}/Utilities/otbgalib
53 54
  ${OTB_SOURCE_DIR}/Utilities/otbkml
  ${OTB_SOURCE_DIR}/Utilities/otbkml/src
55
  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party
56 57
#  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3
#  ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3/contrib
58
  ${OTB_SOURCE_DIR}/Utilities/otbliblas/include
59 60 61
  ${OTB_SOURCE_DIR}/Utilities/otbedison/segm
  ${OTB_SOURCE_DIR}/Utilities/otbedison/prompt
  ${OTB_SOURCE_DIR}/Utilities/otbedison/edge
62 63
  ${OTB_SOURCE_DIR}/Utilities/otbsiftfast
  ${OTB_BINARY_DIR}/Code/Visualization
64

65
)
66 67 68 69 70 71

IF(NOT OTB_USE_EXTERNAL_BOOST)
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
    ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/boost_1_34_1)
ENDIF(NOT OTB_USE_EXTERNAL_BOOST)

72
IF(OTB_COMPILE_JPEG2000)
73
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
Thomas Feuvrier's avatar
Modif  
Thomas Feuvrier committed
74 75
        ${OTB_SOURCE_DIR}/Utilities/otbopenjpeg
        ${OTB_SOURCE_DIR}/Utilities/otbopenjpeg/libopenjpeg)
76
ENDIF(OTB_COMPILE_JPEG2000)
77 78 79 80 81 82 83 84 85 86 87 88

#-----------------------------------------------------------------------------
# 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} )
89 90 91 92 93 94
#-----------------------------------------------------------------------------
# Include directories from the CURL build tree.
IF(OTB_USE_CURL)
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
  	${CURL_INCLUDE_DIR} )
ENDIF(OTB_USE_CURL)
95

96 97 98 99
#-----------------------------------------------------------------------------
# Include directories from the MAPNIK build tree.
IF(OTB_USE_MAPNIK)
  SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
100
  	${MAPNIK_INCLUDE_DIR} ${FREETYPE2_INCLUDE_DIR})
101 102
ENDIF(OTB_USE_MAPNIK)

103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
#-----------------------------------------------------------------------------
# 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}
120 121 122 123
# 2008/12/18: Added ITK include dir
        ${ITK_INCLUDE_DIRS_BUILD_TREE}
        ${ITK_INCLUDE_DIRS_BUILD_TREE_CXX}
        ${ITK_INCLUDE_DIRS_SYSTEM}
124 125 126 127
	${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib
	${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/vxl/v3p/netlib/opt)
ENDIF(OTB_USE_EXTERNAL_ITK)

128 129 130 131 132 133 134 135 136 137
#For FLTK header file
IF(OTB_USE_EXTERNAL_FLTK)
        SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
      ${FLTK_INCLUDE_DIRS} )
ELSE(OTB_USE_EXTERNAL_FLTK)
        SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
                ${OTB_SOURCE_DIR}/Utilities/FLTK
            ${OTB_SOURCE_DIR}/Utilities/FLTK/src
            ${OTB_BINARY_DIR}/Utilities/FLTK )
ENDIF(OTB_USE_EXTERNAL_FLTK)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
138

139 140 141 142 143 144 145 146 147 148

#-----------------------------------------------------------------------------
# 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.
149
#IF(NOT OTB_USE_EXTERNAL_FLTK)
150 151 152 153 154 155
#        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)
156
#        IF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
157
#                INCLUDE(${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake)
158
#        ENDIF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
159 160
#ENDIF(NOT OTB_USE_EXTERNAL_FLTK)

161

162

163
#-----------------------------------------------------------------------------
164
# Include directories from libraries build tree.
165 166


167 168 169 170
#For GLU header file
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
  		${OTB_GLU_INCLUDE_PATH} )

171
#For GDAL header file
172 173 174
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
  		${GDAL_INCLUDE_DIRS} )

175 176 177 178 179 180
#For EXPAT header file
IF(OTB_USE_EXTERNAL_EXPAT)
        SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
  	        ${EXPAT_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_EXPAT)
        SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
181
                ${OTB_SOURCE_DIR}/Utilities/otbexpat)
182 183
ENDIF(OTB_USE_EXTERNAL_EXPAT)

184
# For OpenThreads
185 186
IF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
        SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
187
                ${OTB_SOURCE_DIR}/Utilities/otbopenthreads/OpenThreads/include
188 189
	)
ENDIF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
190 191

#For ITK header file
192 193 194 195 196 197
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}
198
   			${ITK_INCLUDE_DIRS_BUILD_TREE}
199 200 201
   			${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} 	)
ENDIF(OTB_USE_EXTERNAL_ITK)

202 203 204 205 206 207






208 209
#-----------------------------------------------------------------------------
# Include directories from the install tree.
210
# Alls install dirs must been RELATIVE PATH, except for the external libraries, specify by the ABSOLUE PATH
211 212 213 214 215 216
SET(OTB_INSTALL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}${OTB_INSTALL_INCLUDE_DIR}")
#           SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS} )

#           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")
Emmanuel Christophe's avatar
Emmanuel Christophe committed
217

218 219
SET(OTB_INCLUDE_RELATIVE_DIRS )
SET(OTB_INCLUDE_ABSOLUE_DIRS )
Emmanuel Christophe's avatar
Emmanuel Christophe committed
220 221 222

#For BOOST header file
IF(OTB_USE_EXTERNAL_BOOST)
223
  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
Emmanuel Christophe's avatar
Emmanuel Christophe committed
224 225
  	${Boost_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_BOOST)
226 227 228
  SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
        Utilities/BGL
        Utilities/BGL/boost)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
229 230 231
ENDIF(OTB_USE_EXTERNAL_BOOST)


232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
  Common
  BasicFilters
  IO
  ChangeDetection
  FeatureExtraction
  Learning
  MultiScale
  SpatialReasoning
  DisparityMap
  Visu
  Visualization
  Gui
  Projections
  Radiometry
  SARPolarimetry
  Markov
  Fusion
  Utilities
  Utilities/ITK
  Utilities/otbsvm
  Utilities/otbossim
  Utilities/otbossim/include
  Utilities/otbossim/include/ossim
  Utilities/otbossimplugins
  Utilities/InsightJournal
  Utilities/otb6S
  Utilities/tinyXMLlib
#  Utilities/otbgalib
  Utilities/otbkml
  Utilities/otbkml/src
  Utilities/otbkml/third_party
  Utilities/otbkml/third_party/boost_1_34_1
# Utilities/otbkml/third_party/zlib-1.2.3
# Utilities/otbkml/third_party/zlib-1.2.3/contrib
  Utilities/otbliblas/include
  Utilities/otbedison
  Utilities/otbsiftfast
270 271
)

272
IF(OTB_COMPILE_JPEG2000)
273 274 275
  SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
        Utilities/otbopenjpeg
        Utilities/otbopenjpeg/libopenjpeg)
276
ENDIF(OTB_COMPILE_JPEG2000)
277

278
#For GDAL header file
279
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
280 281
  		${GDAL_INCLUDE_DIRS} )

282
#For EXPAT header file
283
IF(OTB_USE_EXTERNAL_EXPAT)
284
        SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
285 286
  	        ${EXPAT_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_EXPAT)
287 288
        SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
                Utilities/otbexpat)
289
ENDIF(OTB_USE_EXTERNAL_EXPAT)
290 291

#For CURL header file
292
IF(OTB_USE_CURL)
293
  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
294 295 296
  	${CURL_INCLUDE_DIR} )
ENDIF(OTB_USE_CURL)

297 298 299 300 301 302
#For MAPNIK header file
IF(OTB_USE_MAPNIK)
  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
  	${MAPNIK_INCLUDE_DIR} )
ENDIF(OTB_USE_MAPNIK)

303
# For OpentTreads  header file
304 305 306 307
IF(OTB_USE_EXTERNAL_OPENTHREADS)
  SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
    ${OPENTHREADS_INCLUDE_DIR} )
ELSE(OTB_USE_EXTERNAL_OPENTHREADS)
308 309
        SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
                Utilities/otbopenthreads/OpenThreads/include)
310 311
ENDIF(OTB_USE_EXTERNAL_OPENTHREADS)

312

313
#For FLTK header file
314
IF(OTB_USE_EXTERNAL_FLTK)
315
        SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
316 317
  		        ${FLTK_INCLUDE_DIRS})
ELSE(OTB_USE_EXTERNAL_FLTK)
318 319
        SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
  		        Utilities/FLTK)
320
ENDIF(OTB_USE_EXTERNAL_FLTK)
321

322
#For GLU header file
323
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
324 325
  		${OTB_GLU_INCLUDE_PATH} )

326
#For ITK header file
327
IF(OTB_USE_EXTERNAL_ITK)
328
	SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
329 330 331
   			${ITK_INCLUDE_DIRS} )
#   			${ITK_INCLUDE_DIRS_INSTALL_TREE} 	)
ELSE(OTB_USE_EXTERNAL_ITK)
332

333 334 335 336 337 338
    #Add prefix path "Utilities/ITK" For ITK_INCLUDE_RELATIVE_DIRS paths
    FOREACH(DIR ${ITK_INCLUDE_RELATIVE_DIRS})
        LIST(APPEND OTB_INCLUDE_RELATIVE_DIRS Utilities/ITK/${DIR})
    ENDFOREACH(DIR)


339
# JULIEN Seems that ITK_INCLUDE_DIRS_CONFIG replaces ITK_INCLUDE_DIRS_INSTALL_TREE
340 341 342 343 344 345 346
#             SET(ITK_INCLUDE_DIRS  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK/)
#             FOREACH(DIR ${ITK_INCLUDE_RELATIVE_DIRS})
#               LIST(APPEND ITK_INCLUDE_DIRS ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK/${DIR})
#             ENDFOREACH(DIR)
#             IF(ITK_INCLUDE_DIRS_SYSTEM)
#               LIST(APPEND ITK_INCLUDE_DIR ${ITK_INCLUDE_DIRS_SYSTEM})
#             ENDIF(ITK_INCLUDE_DIRS_SYSTEM)
347 348


349
#THOMAS
350 351
#                SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
#           			${ITK_INCLUDE_DIRS_INSTALL_TREE}
352
#JULIEN
353 354
#           			${ITK_INCLUDE_DIRS}
#           )
355
#			${ITK_INCLUDE_DIRS_BUILD_TREE}
356
#			${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
357

358
ENDIF(OTB_USE_EXTERNAL_ITK)