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
  if(APPLE)
Guillaume Pasero's avatar
Guillaume Pasero committed
27
    set(LDLIBVAR DYLD_LIBRARY_PATH)
28
  else()
Guillaume Pasero's avatar
Guillaume Pasero committed
29
    set(LDLIBVAR LD_LIBRARY_PATH)
30
  endif()
Guillaume Pasero's avatar
Guillaume Pasero committed
31
  set(SB_CMAKE_COMMAND env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib  ${CMAKE_COMMAND})
Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
32
endif()
33
# Call external projects
34

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

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

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

# TODO

# Call OTB
67
68
69
70

# 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)

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

75
include(External_OTB)
76

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

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

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