CMakeLists.txt 2.25 KB
Newer Older
1
# $Id$
Thomas Feuvrier's avatar
nomsg  
Thomas Feuvrier committed
2

3
PROJECT(OTBExamples)
4

5 6
IF(OTB_BINARY_DIR)
  # We are building inside the tree.
7

8 9 10 11 12 13 14 15 16 17 18 19 20
SUBDIRS( 
  BasicFilters
  FeatureExtraction
  DataRepresentation
  IO
  Filtering
  ChangeDetection
  Learning
  Classification
  Segmentation
  Iterators
  MultiScale
  DisparityMap
Jordi Inglada's avatar
Jordi Inglada committed
21
  Projections
22
  Registration
23
  Radiometry
24
  SARPolarimetry
25
  Fusion
26
  Tutorials
Emmanuel Christophe's avatar
Emmanuel Christophe committed
27
  Markov
Jordi Inglada's avatar
Jordi Inglada committed
28
  OBIA
29
)
30

31
IF(OTB_USE_VISU_GUI)
32
        SUBDIRS(Visu)
33
ENDIF(OTB_USE_VISU_GUI)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
34

35 36 37
IF(OTB_USE_PATENTED)
  SUBDIRS( Patented )
ENDIF(OTB_USE_PATENTED)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
38

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
#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)
59
  IF(BUILD_TESTING)
60
    ENABLE_TESTING()
61
  ENDIF(BUILD_TESTING)
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

  # 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
81
        Radiometry
82
        SARPolarimetry
83
        Fusion
84
        Tutorials
Emmanuel Christophe's avatar
Emmanuel Christophe committed
85
        Markov
Jordi Inglada's avatar
Jordi Inglada committed
86
	OBIA
87 88
        )

89
    IF(OTB_USE_VISU_GUI)
90
        SUBDIRS(Visu)
91
    ENDIF(OTB_USE_VISU_GUI)
92 93 94 95 96 97 98 99

    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)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
100