Commit f486b96c authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: start refactoring of superbuild

parent 61704fed
......@@ -3,10 +3,10 @@ include(CMakeParseArguments)
# Macro SETUP_SYSTEM_LIBRARY : defines USE_SYSTEM_XXX option, initialize
# internal variables
macro(SETUP_SYSTEM_LIBRARY)
cmake_parse_arguments(NEW_SYSLIB "" "PROJECT;DOC" "" ${ARGN})
cmake_parse_arguments(NEW_SYSLIB "" "PROJECT;DEFAULT" "" ${ARGN})
option(USE_SYSTEM_${NEW_SYSLIB_PROJECT}
${NEW_SYSLIB_DOC}
${DEFAULT_USE_SYSTEM_${NEW_SYSLIB_PROJECT}}
" Use a system build of ${NEW_SYSLIB_PROJECT}."
${NEW_SYSLIB_DEFAULT}
)
mark_as_advanced(USE_SYSTEM_${NEW_SYSLIB_PROJECT})
set(SYSTEM_${NEW_SYSLIB_PROJECT}_CMAKE_CACHE)
......
......@@ -19,6 +19,8 @@ option(BUILD_ICE "Clone and build ICE" OFF)
option(BUILD_MONTEVERDI2 "Clone and build Monteverdi2" OFF)
option(BUILD_MONTEVERDI "Clone and build Monteverdi" OFF)
set(SB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(SB_BUILD_SHARED_LIBS ON)
if(WIN32)
......@@ -37,38 +39,36 @@ endif()
# Call external projects
#TODO: enforce check from ITK on directory length
include(External_zlib)
include(External_jpeg)
include(External_expat)
include(External_png)
include(External_tiff)
include(External_proj)
include(External_geotiff)
include(External_sqlite)
include(External_geos)
include(External_openjpeg)
include(External_boost)
include(External_libkml)
include(External_curl)
include(External_gdal)
include(External_fftw)
include(External_itk)
include(External_openthreads)
include(External_ossim)
include(External_muparser)
include(External_muparserx)
include(External_tinyxml)
include(External_opencv)
include(External_pcre)
include(External_swig)
# Setup third parties
SETUP_SYSTEM_LIBRARY(PROJECT ZLIB DEFAULT ON)
SETUP_SYSTEM_LIBRARY(PROJECT JPEG DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT EXPAT DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT PNG DEFAULT ON)
SETUP_SYSTEM_LIBRARY(PROJECT TIFF DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT PROJ DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT GEOTIFF DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT SQLITE DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT GEOS DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT OPENJPEG DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT BOOST DEFAULT ON)
SETUP_SYSTEM_LIBRARY(PROJECT LIBKML DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT CURL DEFAULT ON)
SETUP_SYSTEM_LIBRARY(PROJECT GDAL DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT FFTW DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT ITK DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT OPENTHREADS DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT OSSIM DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT MUPARSER DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT MUPARSERX DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT TINYXML DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT OPENCV DEFAULT OFF)
SETUP_SYSTEM_LIBRARY(PROJECT PCRE DEFAULT ON)
SETUP_SYSTEM_LIBRARY(PROJECT SWIG DEFAULT ON)
if(ENABLE_QT4)
include(External_qt4)
SETUP_SYSTEM_LIBRARY(PROJECT QT4 DEFAULT ON)
endif()
# TODO
# Call OTB
# set OTB_DATA_ROOT to run test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment