CMakeLists.txt 2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
cmake_minimum_required(VERSION 2.8.3)


project(OTB-SuperBuild)

# Path to additional CMake modules
set(CMAKE_MODULE_PATH
    ${CMAKE_SOURCE_DIR}/CMake
    ${CMAKE_MODULE_PATH})

include(ExternalProject)
12
include(CTest)
13

14 15 16
# General options
option(ENABLE_QT4 " Use QT4 in the SuperBuild" ON)
option(ENABLE_OTB_LARGE_INPUTS " Use the OTB-LargeInputs for testing" OFF)
17 18 19
option(BUILD_ICE "Clone and build ICE" OFF)
option(BUILD_MONTEVERDI2 "Clone and build Monteverdi2" OFF)
option(BUILD_MONTEVERDI "Clone and build Monteverdi" OFF)
20

21 22 23 24
if(WIN32)
  if(MSVC)
    set(SB_CMAKE_COMMAND ${CMAKE_COMMAND})
  endif()      
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
25
else(UNIX)
26 27 28 29 30 31
  if(APPLE)
    set(LDLIB DYLD_LIBRARY_PATH)
  else()
    set(LDLIB LD_LIBRARY_PATH)
  endif()
  
32
  set(SB_CMAKE_COMMAND env LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib  ${CMAKE_COMMAND})
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
33
endif()
34
# Call external projects
35

Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
36
#TODO: enforce check from ITK on directory length
37

38
include(External_zlib)
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
39 40 41
include(External_jpeg)
include(External_expat)
include(External_libpng)
42 43 44
include(External_libtiff)
include(External_proj4)
include(External_geotiff)
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
45
include(External_SQLite)
46 47
include(External_geos)
include(External_OpenJpeg)
48 49 50
include(External_boost)
include(External_libKML)
include(External_curl)
51
include(External_GDAL)
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
52
include(External_fftw)
53
include(External_ITK)
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
54
include(External_OpenThreads)
55
include(External_ossim)
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
56 57 58
include(External_muParser)
include(External_muParserX)
include(External_TinyXML)
Guillaume Pasero's avatar
Guillaume Pasero committed
59
include(External_OpenCV)
60 61 62 63

if(ENABLE_QT4)
  include(External_qt4)
endif()
64 65 66 67

# TODO

# Call OTB
68 69 70 71

# set OTB_DATA_ROOT to run test
find_path(OTB_DATA_ROOT README-OTB-Data PATHS $ENV{OTB_DATA_ROOT} ${OTB-SuperBuild_SOURCE_DIR}/../OTB-Data)

72 73 74 75
if(ENABLE_OTB_LARGE_INPUTS)
  find_path(OTB_DATA_LARGEINPUT_ROOT OTBData.readme $ENV{OTB_DATA_LARGEINPUT_ROOT})
endif()

76
include(External_OTB)
77

78 79 80 81
if(BUILD_ICE)
  option(BUILD_ICE_APPLICATION "Build the Ice application (requires glfw and glut)" OFF)
  include(External_Ice)
endif()
82

83
if(BUILD_MONTEVERDI2)
84 85
  include(External_Monteverdi2)
endif()
86

87 88 89
if(BUILD_MONTEVERDI)
  include(External_Monteverdi)
endif()