Skip to content
Snippets Groups Projects
Commit 90f41b2e authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Correction sur Fichier : ajout de l'option qui permet de différencier une compilation des exemples

- dans l'arborescence ou
- en dehors de l'arborescence
de l'OTB.
parent 501610c8
Branches
Tags
No related merge requests found
PROJECT(HelloWorld)
# $Id$
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
INCLUDE(${OTB_USE_FILE})
ELSE(OTB_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build OTB project without OTB. Please set OTB_DIR.")
ENDIF(OTB_FOUND)
PROJECT(OTBExamples)
ADD_EXECUTABLE(HelloWorldOTB HelloWorldOTB.cxx )
TARGET_LINK_LIBRARIES(HelloWorldOTB OTBCommon OTBIO)
IF(OTB_BINARY_DIR)
# We are building inside the tree.
ADD_EXECUTABLE(Pipeline Pipeline.cxx )
TARGET_LINK_LIBRARIES(Pipeline OTBCommon OTBIO)
SUBDIRS(
BasicFilters
FeatureExtraction
DataRepresentation
IO
Filtering
ChangeDetection
Learning
Classification
Segmentation
Iterators
MultiScale
DisparityMap
Registration
Tutorials
)
ADD_EXECUTABLE(FilteringPipeline FilteringPipeline.cxx )
TARGET_LINK_LIBRARIES(FilteringPipeline OTBCommon OTBIO)
IF(OTB_USE_VISU)
SUBDIRS(Visu)
ENDIF(OTB_USE_VISU)
ADD_EXECUTABLE(ScalingPipeline ScalingPipeline.cxx )
TARGET_LINK_LIBRARIES(ScalingPipeline OTBCommon OTBIO)
IF(OTB_USE_PATENTED)
SUBDIRS( Patented )
ENDIF(OTB_USE_PATENTED)
ADD_EXECUTABLE(SmarterFilteringPipeline SmarterFilteringPipeline.cxx )
TARGET_LINK_LIBRARIES(SmarterFilteringPipeline OTBCommon OTBIO)
#Recopie du fichier README.txt dans l'arborescence BINARY
IF( EXISTS ${OTB_BINARY_DIR}/Examples/README.txt )
ELSE( EXISTS ${OTB_BINARY_DIR}/Examples/README.txt )
CONFIGURE_FILE(${OTB_SOURCE_DIR}/Examples/README.txt
${OTB_BINARY_DIR}/Examples/README.txt @ONLY IMMEDIATE)
ENDIF( EXISTS ${OTB_BINARY_DIR}/Examples/README.txt )
ELSE(OTB_BINARY_DIR)
# We are building as a stand-alone project.
SET(LIBRARY_OUTPUT_PATH ${OTBExamples_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
SET(EXECUTABLE_OUTPUT_PATH ${OTBExamples_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
# Configure Dart testing support.
SET(PROJECT_SOURCE_DIR "${OTBExamples_SOURCE_DIR}/..")
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
SET(PROJECT_SOURCE_DIR "${OTBExamples_SOURCE_DIR}")
MARK_AS_ADVANCED(TCL_TCLSH)
IF(BUILD_TESTING)
ENABLE_TESTING()
ENDIF(BUILD_TESTING)
# Find OTB and load its settings.
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
INCLUDE(${OTB_USE_FILE})
SUBDIRS(
BasicFilters
FeatureExtraction
DataRepresentation
IO
Filtering
ChangeDetection
Learning
Classification
Segmentation
Iterators
MultiScale
DisparityMap
Registration
Tutorials
)
IF(OTB_USE_VISU)
SUBDIRS(Visu)
ENDIF(OTB_USE_VISU)
IF(OTB_USE_PATENTED)
SUBDIRS( Patented )
ENDIF(OTB_USE_PATENTED)
ELSE(OTB_FOUND)
MESSAGE("OTB not found. Please set OTB_DIR")
ENDIF(OTB_FOUND)
ENDIF(OTB_BINARY_DIR)
ADD_EXECUTABLE(SimpleViewer SimpleViewer.cxx )
TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisu)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment