CMakeLists.txt 15.8 KB
Newer Older
1
#
Julien Michel's avatar
Julien Michel committed
2
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
# This file is part of Orfeo Toolbox
#
#     https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

21
cmake_minimum_required(VERSION 3.10.2)
22 23 24

project(OTB-SuperBuild)

25 26 27 28
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

29
# Path to additional CMake modules
30
#MESSAGE(INFO "${CMAKE_SOURCE_DIR}")
31 32
set(CMAKE_MODULE_PATH
    ${CMAKE_SOURCE_DIR}/CMake
33
    ${CMAKE_SOURCE_DIR}/../CMake
34 35
    ${CMAKE_MODULE_PATH}
    )
36

37 38 39 40
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  message(WARNING "The support of debug build in SuperBuild is incomplete, some dependencies such as NetCDF don't support it.")
endif()

41
include(ExternalProject)
42

43 44
include(OTBCheckTargetSystemArch)

45 46 47 48 49
set(LINUX FALSE)
if( "${CMAKE_SYSTEM_NAME}"  MATCHES "Linux")
  set(LINUX TRUE)
endif()

50 51 52 53
option(BUILD_SHARED_LIBS "Build Superbuild with shared libraries." ON)
mark_as_advanced(BUILD_SHARED_LIBS)
option(BUILD_GEOS_STATIC_LIBS "Build GEOS with static libraries." OFF)
mark_as_advanced(BUILD_GEOS_STATIC_LIBS)
54
option(BUILD_ALWAYS "Always build or install OTB." ON)
55
option(WITH_REMOTE_MODULES "Build with specific list of remote modules." OFF)
56
option(OTB_USE_OPENMP "use openmp" OFF)
57 58 59
set(OTB_ADDITIONAL_CACHE "" CACHE STRING "Additional cmake options for OTB with "
  "the syntax (semi-colon used as a separator): "
  "-D<var>:<type>=<value>;-D<var>:<type>=<value>")
60

61 62 63 64
if(APPLE)
  set(CMAKE_MACOSX_RPATH TRUE)
endif()

65 66 67 68 69 70 71 72 73 74 75 76 77 78
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH  FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")
79

80
# TODO BUILD_TESTING is created by default by CTest.cmake, and is ON by default.
81
option(BUILD_TESTING "Build the testing tree." OFF)
82

83
include(CTest)
84
include(SuperBuild_Macro)
85

86 87 88 89 90
# Configure location where source tar-balls are downloaded
find_path(DOWNLOAD_LOCATION
  NAMES OTBSuperBuild.readme
  HINTS $ENV{DOWNLOAD_LOCATION} "${CMAKE_CURRENT_BINARY_DIR}/Downloads"
  )
91

92
# General options
93 94 95 96 97 98 99 100 101 102
option(OTB_DATA_USE_LARGEINPUT "Use Large inputs images test." OFF)
mark_as_advanced(OTB_DATA_USE_LARGEINPUT)
if(OTB_DATA_USE_LARGEINPUT)
  find_path(OTB_DATA_LARGEINPUT_ROOT
    NAMES OTBData.readme
    HINTS $ENV{OTB_DATA_LARGEINPUT_ROOT}
  )
  mark_as_advanced(OTB_DATA_LARGEINPUT_ROOT)
endif()

103
option(BUILD_EXAMPLES " Build the OTB Examples directory" OFF)
104

105
option(USE_DEFAULT_INSTALL_PREFIX "Install superbuild to default prefix /usr/local for unix" OFF)
106

107 108 109 110 111 112 113 114 115 116
#get version of OTB from source_dir/CMakeLists.txt
get_version(
  INPUT_FILE   "${CMAKE_SOURCE_DIR}/../CMakeLists.txt"
  MATCH_STRINGS "OTB_VERSION_MAJOR" "OTB_VERSION_MINOR" "OTB_VERSION_PATCH"
  PREFIX SUPERBUILD
  )

set(SUPERBUILD_OTB_VERSION "${SUPERBUILD_OTB_VERSION_MAJOR}.${SUPERBUILD_OTB_VERSION_MINOR}.${SUPERBUILD_OTB_VERSION_PATCH}")

message("OTB version : ${SUPERBUILD_OTB_VERSION}")
117

118
# Special setting for low kernel versions
119 120
if(UNIX)
  option(USE_LOW_KERNEL_VERSION "Try to keep the minimal kernel version as low as possible" ON)
121
  mark_as_advanced(USE_LOW_KERNEL_VERSION)
122 123 124 125
endif()


# Default install prefix
126
get_filename_component(PARENT_OF_BINARY_DIR ${CMAKE_BINARY_DIR} PATH)
127
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT USE_DEFAULT_INSTALL_PREFIX)
128 129 130 131 132 133 134 135
  set (CMAKE_INSTALL_PREFIX
    "${PARENT_OF_BINARY_DIR}/superbuild_install"
    CACHE
    PATH
    "default install path for superbuild"
    FORCE )
endif()

136 137
set(SB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

138
file(TO_NATIVE_PATH "${SB_INSTALL_PREFIX}" SB_INSTALL_PREFIX_NATIVE)
139

140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
# Check if CMAKE_INSTALL_PREFIX is set by default
if(WIN32)
  if(CMAKE_INSTALL_PREFIX STREQUAL "C:/Program Files (x86)/OTB-SuperBuild"
     OR CMAKE_INSTALL_PREFIX STREQUAL "C:/Program Files/OTB-SuperBuild")
    message(WARNING
      "The CMAKE_INSTALL_PREFIX variable seems to be set by default : "
      "${CMAKE_INSTALL_PREFIX}. Be aware that this directory will be used"
      " during the build (even without calling the install target). Please "
      "make sure you want to use this directory as the SuperBuild output.")
  endif()
elseif(UNIX)
  if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
    message(WARNING
      "The CMAKE_INSTALL_PREFIX variable seems to be set by default : "
      "${CMAKE_INSTALL_PREFIX}. Be aware that this directory will be used"
      " during the build (even without calling the install target). Please "
      "make sure you want to use this directory as the SuperBuild output.")
  endif()
endif()

160 161 162 163
if(NOT CMAKE_BUILD_TYPE)
  message(STATUS "CMake build type is none. Setting it to Release")
  set(CMAKE_BUILD_TYPE Release)
endif()
164

165
if(MSVC)
166
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE")
167 168
  if(MSVC_VERSION GREATER 1310)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
169
  endif()
170 171
endif()

172 173 174 175 176
if(DEFINED ENV{CMAKE_PREFIX_PATH})
  set(SB_CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${SB_INSTALL_PREFIX}")
else()
  set(SB_CMAKE_PREFIX_PATH "${SB_INSTALL_PREFIX}")
endif()
177

178 179
list(REMOVE_DUPLICATES SB_CMAKE_PREFIX_PATH)

180 181 182 183
set(SB_CMAKE_CACHE_ARGS)
list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}")
list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_PREFIX}")
list(APPEND SB_CMAKE_CACHE_ARGS "-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}")
184
list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_PREFIX_PATH:PATH=${SB_CMAKE_PREFIX_PATH}")
185 186

if(APPLE)
187
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_MACOSX_RPATH:BOOL=${CMAKE_MACOSX_RPATH}")
188 189 190
endif()

if(UNIX)
191 192 193
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_SKIP_BUILD_RPATH:BOOL=${CMAKE_SKIP_BUILD_RPATH}")
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=${CMAKE_BUILD_WITH_INSTALL_RPATH}")
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=${CMAKE_INSTALL_RPATH_USE_LINK_PATH}")
194
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_RPATH:PATH=${CMAKE_INSTALL_RPATH}")
195
endif()
196

197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
foreach(cmake_var
    CMAKE_C_FLAGS
    CMAKE_CXX_FLAGS
    CMAKE_EXE_LINKER_FLAGS
    CMAKE_SHARED_LINKER_FLAGS
    CMAKE_MODULE_LINKER_FLAGS
    CMAKE_STATIC_LINKER_FLAGS
    )
  if(${cmake_var})
    list(APPEND SB_CMAKE_CACHE_ARGS "-D${cmake_var}:STRING=${${cmake_var}}")
    list(APPEND SB_CMAKE_CACHE_ARGS "-D${cmake_var}:STRING=${${cmake_var}}")
  endif()
endforeach()

if(CMAKE_VERBOSE_MAKEFILE)
  list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON")
endif()

215
set(SB_CMAKE_ARGS "-G${CMAKE_GENERATOR}")
216 217 218 219 220 221 222 223 224 225 226 227 228

set(SB_CONFIGURE_ARGS)

list(APPEND SB_CONFIGURE_ARGS "--prefix=${CMAKE_INSTALL_PREFIX}")

if(BUILD_SHARED_LIBS)
  list(APPEND SB_CONFIGURE_ARGS "--enable-static=no")
  list(APPEND SB_CONFIGURE_ARGS "--enable-shared=yes")
else()
  list(APPEND SB_CONFIGURE_ARGS "--enable-static=yes")
  list(APPEND SB_CONFIGURE_ARGS "--enable-shared=no")
endif()

229 230 231 232 233 234
if(CMAKE_BUILD_TYPE MATCHES "Debug")
  list(APPEND SB_CONFIGURE_ARGS "--enable-debug=yes")
else()
  list(APPEND SB_CONFIGURE_ARGS "--enable-debug=no")
endif()

235
if(UNIX)
236 237
  set(SB_CMAKE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
  set(SB_ENV_CONFIGURE_CMD env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
238
  message(STATUS "Environment setup for Configure (SB_ENV_CONFIGURE_CMD): ${SB_ENV_CONFIGURE_CMD}")
Rashad Kanavath's avatar
Rashad Kanavath committed
239
else()
240
  #windows
241
  set(SB_CMAKE_COMMAND ${CMAKE_COMMAND})
Rashad Kanavath's avatar
Rashad Kanavath committed
242
endif()
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259

if(CMAKE_C_FLAGS)
  list(APPEND SB_ENV_CONFIGURE_CMD "CFLAGS=${CMAKE_C_FLAGS}")
endif()
if(CMAKE_CXX_FLAGS)
  list(APPEND SB_ENV_CONFIGURE_CMD "CXXFLAGS=${CMAKE_CXX_FLAGS}")
endif()
if(CMAKE_EXE_LINKER_FLAGS)
  list(APPEND SB_ENV_CONFIGURE_CMD "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}")
endif()
if(CMAKE_SHARED_LINKER_FLAGS)
  list(APPEND SB_ENV_CONFIGURE_CMD "LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}")
endif()
if(CMAKE_MODULE_LINKER_FLAGS)
  list(APPEND SB_ENV_CONFIGURE_CMD "LDFLAGS=${CMAKE_MODULE_LINKER_FLAGS}")
endif()

260 261 262
# This is needed for gdal 2.4 in order to find OpenJPEG
list(APPEND SB_ENV_CONFIGURE_CMD "PKG_CONFIG_PATH=${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")

263 264
list(REMOVE_DUPLICATES SB_ENV_CONFIGURE_CMD)

265
message(STATUS "Environment setup for CMake (SB_CMAKE_COMMAND) : ${SB_CMAKE_COMMAND}")
Rashad Kanavath's avatar
Rashad Kanavath committed
266

267 268
set(FROM_SYSTEM_LIST)
set(FROM_SUPERBUILD_LIST)
269

Rashad Kanavath's avatar
MRG  
Rashad Kanavath committed
270
#TODO: enforce check from ITK on directory length
271
# Setup third parties
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
option(USE_SYSTEM_ZLIB "Use a system build of zlib" OFF)
option(USE_SYSTEM_JPEG "Use a system build of JPEG" OFF)
option(USE_SYSTEM_EXPAT "Use a system build of expat" OFF)
option(USE_SYSTEM_PNG "Use a system build of libpng" OFF)
option(USE_SYSTEM_TIFF "Use a system build of libtiff" OFF)
option(USE_SYSTEM_PROJ  "Use a system build of Proj.4" OFF)
option(USE_SYSTEM_GEOTIFF  "Use a system build of GeoTIFF" OFF)
option(USE_SYSTEM_SQLITE  "Use a system build of sqlite" OFF)
option(USE_SYSTEM_GEOS "Use a system build of GEOS" OFF)
option(USE_SYSTEM_OPENJPEG "Use a system build of OpenJPEG" OFF)
option(USE_SYSTEM_BOOST "Use a system build of Boost" OFF)
option(USE_SYSTEM_LIBKML  "Use a system build of LibKML" OFF)
option(USE_SYSTEM_CURL  "Use a system build of cURL" OFF)
option(USE_SYSTEM_OPENSSL  "Use a system build of OpenSSL" OFF)
option(USE_SYSTEM_GDAL "Use a system build of GDAL" OFF)
option(USE_SYSTEM_FFTW "Use a system build of FFTW" OFF)
option(USE_SYSTEM_ITK "Use a system build of ITK" OFF)
option(USE_SYSTEM_OPENTHREADS  "Use a system build of OpenThreads" OFF)
290
option(USE_SYSTEM_OSSIM  "Use a system build of OSSIM" OFF)
291 292 293 294 295 296 297
option(USE_SYSTEM_MUPARSER  "Use a system build of muParser" OFF)
option(USE_SYSTEM_MUPARSERX "Use a system build of  muParserX" OFF)
option(USE_SYSTEM_TINYXML  "Use a system build of TinyXML" OFF)
option(USE_SYSTEM_OPENCV  "Use a system build of OpenCV" OFF)
option(USE_SYSTEM_LIBSVM  "Use a system build of libsvm" OFF)
option(USE_SYSTEM_PCRE "Use a system build of PCRE" ON)
option(USE_SYSTEM_SWIG "Use a system build of swig" ON)
298
option(USE_SYSTEM_QT5 "Use a system build of QT5"  OFF)
299 300 301 302 303 304
option(USE_SYSTEM_QWT  "Use a system build of Qwt" OFF)
option(USE_SYSTEM_GLEW  "Use a system build of GLEW" OFF)
option(USE_SYSTEM_GLFW  "Use a system build of glfw" OFF)
option(USE_SYSTEM_GLUT  "Use a system build of glut" OFF)
option(USE_SYSTEM_FREETYPE "Use a system build of freetype" OFF)
option(USE_SYSTEM_SHARK "Use a system build of Shark" OFF)
305 306 307
option(USE_SYSTEM_HDF4 "Use a system build of HDF4" OFF)
option(USE_SYSTEM_HDF5 "Use a system build of HDF5" OFF)
option(USE_SYSTEM_NETCDF "Use a system build of NetCDF" OFF)
Manuel Grizonnet's avatar
Manuel Grizonnet committed
308
option(USE_SYSTEM_GSL "Use a system build of GSL" OFF)
309 310

# Call OTB
311 312
option(OTB_USE_6S "Enable module 6S in OTB" ON)
option(OTB_USE_CURL "Enable module Curl in OTB" ON)
313 314 315 316 317 318
#RK: disabled libkml. problems on windows msvc
if(MSVC)
  option(OTB_USE_LIBKML "Enable module libKML in OTB" OFF)
else()
  option(OTB_USE_LIBKML "Enable module libKML in OTB" ON)
endif()
319 320 321 322
option(OTB_USE_LIBSVM "Enable module libSVM in OTB" ON)
option(OTB_USE_MUPARSER "Enable module muparser in OTB" ON)
option(OTB_USE_MUPARSERX "Enable module muparserX in OTB" ON)
option(OTB_USE_OPENCV "Enable module OpenCV in OTB" ON)
323
option(OTB_USE_QT "Enable module QT5 in OTB" ON)
324
option(OTB_USE_SIFTFAST "Enable module Siftfast in OTB" ON)
325 326
option(OTB_USE_OPENGL "Enable module OpenGL in OTB" ON)
option(OTB_USE_GLEW "Enable module GLEW in OTB" ON)
327

Manuel Grizonnet's avatar
Manuel Grizonnet committed
328
#Cannot activate GLUT on OSX. See Mantis issue #1194")
329
# do not activate GLFW by default on osx. see failing test
330
# https://dash.orfeo-toolbox.org/testDetails.php?test=59844554&build=287120
331 332
if(APPLE)
  option(OTB_USE_GLUT "Enable module GLUT in OTB" OFF)
333
  option(OTB_USE_GLFW "Enable module GLFW in OTB" OFF)
334 335
else()
  option(OTB_USE_GLUT "Enable module GLUT in OTB" ON)
336
  option(OTB_USE_GLFW "Enable module GLFW in OTB" ON)
337 338
endif()

339
option(OTB_USE_SHARK "Enable module Shark in OTB" ON)
340 341
include (CMakeDependentOption)
CMAKE_DEPENDENT_OPTION( OTB_USE_QWT "Enable module QWT in OTB" ON "OTB_USE_QT" OFF)
342
option(OTB_USE_GSL "Enable module GSL in OTB" ON)
343

344 345 346
option(OTB_USE_MPI "Enable MPI in OTB" OFF)
option(OTB_USE_SPTW "Enable Simple Parallel Tiff Writer in OTB" OFF)

347
# set OTB_DATA_ROOT to run test
348 349
find_path(OTB_DATA_ROOT
  NAMES README-OTB-Data
350
  HINTS ${OTB-SuperBuild_SOURCE_DIR}/../Data
351
  )
352

353
# SWIG Wrapping
354
option(OTB_WRAP_PYTHON "Enable python wrappers for OTB applications (requires SWIG)" ON)
355

356 357 358
configure_file(${CMAKE_SOURCE_DIR}/CMake/CTestCustom.cmake.in
  ${CMAKE_BINARY_DIR}/CTestCustom.cmake @ONLY)

359
# do a system checkup
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
if (NOT EXISTS "${CMAKE_BINARY_DIR}/CMake/SystemCheckup")
  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/CMake/SystemCheckup")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/CMake/SystemCheckup
                WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMake/SystemCheckup
                OUTPUT_QUIET
                ERROR_QUIET)
file(STRINGS "${CMAKE_BINARY_DIR}/CMake/SystemCheckup/SystemCheckupResult.txt" _SYSTEM_CHECKUP_CONTENT)
message(STATUS "|----------------------------------------------------------")
message(STATUS "|----------------- System checkup results -----------------")
message(STATUS "| The following libraries have been found on your system.")
message(STATUS "| You can choose to use them (instead of superbuild versions)")
message(STATUS "| by setting the corresponding option USE_SYSTEM_XXX.")
message(STATUS "|----------------------------------------------------------")
foreach(lib ${_SYSTEM_CHECKUP_CONTENT})
  message(STATUS "| ${lib}")
  message(STATUS "|----------------------------------------------------------")
endforeach()
378

379 380 381 382 383
# Python
# This should set the following variables (and more):
#   -PYTHON_EXECUTABLE
#   -PYTHON_INCLUDE_DIR
#   -PYTHON_LIBRARY
Antoine Regimbeau's avatar
Antoine Regimbeau committed
384 385 386 387
set ( Python_ADDITIONAL_VERSIONS "3;2" )
set ( PythonInterp_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
set ( PythonLibs_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
find_package( PythonInterp )
388
if ( OTB_WRAP_PYTHON AND ( "x${PYTHON_VERSION_MAJOR}" STREQUAL "x2" ) )
389 390 391
    message (WARNING "Python3 not found. There is no longer support of \
    wrapping in python2 in OTB, but it can still be used.")
endif()
Antoine Regimbeau's avatar
Antoine Regimbeau committed
392 393
set (Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
find_package ( PythonLibs )
394

395 396
include(External_otb)

397 398
if(FROM_SYSTEM_LIST)
  list(SORT FROM_SYSTEM_LIST)
399
  foreach( item ${FROM_SYSTEM_LIST})
400
    message(STATUS "Using system version of ${item}")
401
  endforeach()
402 403 404 405
endif()

if(FROM_SUPERBUILD_LIST)
  list(SORT FROM_SUPERBUILD_LIST)
406
  foreach( item ${FROM_SUPERBUILD_LIST})
407
    message(STATUS "Using SuperBuild version of ${item}")
408
  endforeach()
409
endif()
410

411 412
message(STATUS "OTB_TARGET_SYSTEM_ARCH=${OTB_TARGET_SYSTEM_ARCH}")
message(STATUS "OTB_TARGET_SYSTEM_ARCH_IS_X64=${OTB_TARGET_SYSTEM_ARCH_IS_X64}")
413

414
if(DOWNLOAD_LOCATION)
415
  message(STATUS "DOWNLOAD_LOCATION=${DOWNLOAD_LOCATION}")
416 417 418 419
  message(STATUS "Source archives for dependencies will be taken from '${DOWNLOAD_LOCATION}'")
else()
  message(STATUS "DOWNLOAD_LOCATION is not set. We will download all source archives during build!")
endif()
420

421
message(STATUS "SuperBuild will be installed to ${CMAKE_INSTALL_PREFIX}")
422
message(STATUS "To install to a different directory, re-run cmake -DCMAKE_INSTALL_PREFIX=/your/preferred/path")