CMakeLists.txt 1.55 KB
Newer Older
1 2 3
if(NOT OTB_BUILD_DEFAULT_MODULES)
  message(FATAL_ERROR "BUILD_EXAMPLES requires OTB_BUILD_DEFAULT_MODULES to be ON")
endif()
4 5 6 7
# We also need to prevent any OTB_USE_XXX option to be OFF (except mapnik)
# For now we parse module activation list and test if option is ON. If not the cmake configuration stop.
#TODO We should provide a better mechanism here wich will deactivate only examples required by deactivated options.
foreach (_activationOption ${OTB_MODULE_ACTIVATION_OPTION_LIST})
8
  if(NOT ${_activationOption} AND NOT "x${_activationOption}" STREQUAL "xOTB_USE_MAPNIK")
9 10 11
    message(FATAL_ERROR "BUILD_EXAMPLES requires ${_activationOption} to be ON")
  endif()
endforeach()
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

find_package(OTB REQUIRED)
include(${OTB_USE_FILE})
# TODO : build as standalone project

set(OTB_TEST_DRIVER otbTestDriver)

if(BUILD_APPLICATIONS)
  add_subdirectory(Application)
endif()
add_subdirectory(BasicFilters)
add_subdirectory(ChangeDetection)
add_subdirectory(Classification)
add_subdirectory(DataRepresentation)
add_subdirectory(DimensionReduction)
add_subdirectory(DisparityMap)
add_subdirectory(FeatureExtraction)
add_subdirectory(Filtering)
add_subdirectory(Fusion)
add_subdirectory(Hyperspectral)
add_subdirectory(Installation)
add_subdirectory(IO)
add_subdirectory(Iterators)
add_subdirectory(Learning)
add_subdirectory(Markov)
add_subdirectory(MultiScale)
add_subdirectory(OBIA)
add_subdirectory(Patented)
add_subdirectory(Projections)
add_subdirectory(Radiometry)
add_subdirectory(Registration)
add_subdirectory(Segmentation)
add_subdirectory(Simulation)
add_subdirectory(Tutorials)