Commit 0e0ccbac authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

COMP: cleaning compilation process

parent 7d456e53
...@@ -954,14 +954,28 @@ ENDIF(OTB_USE_VISU_GUI) ...@@ -954,14 +954,28 @@ ENDIF(OTB_USE_VISU_GUI)
OPTION(BUILD_EXAMPLES "Build the Examples directory." OFF) OPTION(BUILD_EXAMPLES "Build the Examples directory." OFF)
#-----------------------------------------------------------------------------
# The entire OTB tree should use the same include path
# Create the list of include directories needed for OTB header files.
INCLUDE(${OTB_SOURCE_DIR}/otbIncludeDirectories.cmake)
# This should be the only INCLUDE_DIRECTORIES command in the entire
# tree, except for the Utilities and Wrapping directories. We need to
# do this in one place to make sure the order is correct.
INCLUDE_DIRECTORIES(
${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${OTB_INCLUDE_DIRS_SYSTEM}
)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dispatch the build into the proper subdirectories. # Dispatch the build into the proper subdirectories.
#Note: SUBDIRS is deprecated and should be replaced by ADD_SUBDIRECTORY #Note: SUBDIRS is deprecated and is replaced by ADD_SUBDIRECTORY
SUBDIRS(Utilities Code) #SUBDIRS(Utilities Code)
#ADD_SUBDIRECTORY(Utilities) ADD_SUBDIRECTORY(Utilities)
#ADD_SUBDIRECTORY(Code) ADD_SUBDIRECTORY(Code)
#ADD_SUBDIRECTORY(Utilities/otbsvm)
IF (BUILD_EXAMPLES) IF (BUILD_EXAMPLES)
ADD_SUBDIRECTORY(Examples) ADD_SUBDIRECTORY(Examples)
...@@ -1031,16 +1045,16 @@ CONFIGURE_FILE(${OTB_SOURCE_DIR}/otbConfigure.h.in ...@@ -1031,16 +1045,16 @@ CONFIGURE_FILE(${OTB_SOURCE_DIR}/otbConfigure.h.in
# The entire OTB tree should use the same include path # The entire OTB tree should use the same include path
# Create the list of include directories needed for OTB header files. # Create the list of include directories needed for OTB header files.
INCLUDE(${OTB_SOURCE_DIR}/otbIncludeDirectories.cmake) #INCLUDE(${OTB_SOURCE_DIR}/otbIncludeDirectories.cmake)
# This should be the only INCLUDE_DIRECTORIES command in the entire # This should be the only INCLUDE_DIRECTORIES command in the entire
# tree, except for the Utilities and Wrapping directories. We need to # tree, except for the Utilities and Wrapping directories. We need to
# do this in one place to make sure the order is correct. # do this in one place to make sure the order is correct.
INCLUDE_DIRECTORIES( #INCLUDE_DIRECTORIES(
${OTB_INCLUDE_DIRS_BUILD_TREE} # ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} # ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${OTB_INCLUDE_DIRS_SYSTEM} # ${OTB_INCLUDE_DIRS_SYSTEM}
) #)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Uninstall cmake use to uninstall OTB. # Uninstall cmake use to uninstall OTB.
......
SUBDIRS( ADD_SUBDIRECTORY(Containers)
Containers ADD_SUBDIRECTORY(Image)
Image ADD_SUBDIRECTORY(Mesh)
Mesh ADD_SUBDIRECTORY(Path)
Path
)
...@@ -19,7 +19,10 @@ ELSE(OTB_USE_EXTERNAL_BOOST) ...@@ -19,7 +19,10 @@ ELSE(OTB_USE_EXTERNAL_BOOST)
) )
ENDIF(OTB_USE_EXTERNAL_BOOST) ENDIF(OTB_USE_EXTERNAL_BOOST)
#-----------------------------------------------------------------------------
# Include directories from the GDAL build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIR} )
# These directories are always needed. # These directories are always needed.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE} SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
...@@ -97,10 +100,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE} ...@@ -97,10 +100,7 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
) )
#-----------------------------------------------------------------------------
# Include directories from the GDAL build tree.
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${GDAL_INCLUDE_DIR} )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Include directories from the CURL build tree. # Include directories from the CURL build tree.
IF(OTB_USE_CURL) IF(OTB_USE_CURL)
...@@ -221,10 +221,6 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX} ) ...@@ -221,10 +221,6 @@ 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} SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${OTB_GLU_INCLUDE_PATH} ) ${OTB_GLU_INCLUDE_PATH} )
#For GDAL header file
SET(OTB_INCLUDE_DIRS_BUILD_TREE_CXX ${OTB_INCLUDE_DIRS_BUILD_TREE_CXX}
${GDAL_INCLUDE_DIR} )
#For EXPAT header file #For EXPAT header file
IF(OTB_USE_EXTERNAL_EXPAT) IF(OTB_USE_EXTERNAL_EXPAT)
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}
......
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