Commit e9a31db5 authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: C-x h M-x indent-region

parent 7f35e94e
INCLUDE_ONCE_MACRO(ITK)
SETUP_SUPERBUILD(PROJECT ITK)
SETUP_SUPERBUILD(PROJECT ITK)
# if(MSVC)
# set(ITK_SB_SRC "C:/Temp/ITK")
# set(ITK_SB_BUILD_DIR ${ITK_SB_SRC}/build)
# endif()
# if(MSVC)
# set(ITK_SB_SRC "C:/Temp/ITK")
# set(ITK_SB_BUILD_DIR ${ITK_SB_SRC}/build)
# endif()
set(ITK_ENABLED_MODULES
Common
FiniteDifference
GPUCommon
GPUFiniteDifference
ImageAdaptors
ImageFunction
Mesh
QuadEdgeMesh
SpatialObjects
#TestKernel
Transform
set(ITK_ENABLED_MODULES
Common
FiniteDifference
GPUCommon
GPUFiniteDifference
ImageAdaptors
ImageFunction
Mesh
QuadEdgeMesh
SpatialObjects
#TestKernel
Transform
AnisotropicSmoothing
AntiAlias
BiasCorrection
BinaryMathematicalMorphology
Colormap
Convolution
CurvatureFlow
Deconvolution
Denoising
#DiffusionTensorImage
DisplacementField
DistanceMap
FastMarching
FFT
GPUAnisotropicSmoothing
GPUImageFilterBase
GPUSmoothing
GPUThresholding
ImageCompare
ImageCompose
ImageFeature
ImageFilterBase
ImageFusion
ImageGradient
ImageGrid
ImageIntensity
ImageLabel
ImageSources
ImageStatistics
LabelMap
MathematicalMorphology
Path
QuadEdgeMeshFiltering
Smoothing
SpatialFunction
Thresholding
AnisotropicSmoothing
AntiAlias
BiasCorrection
BinaryMathematicalMorphology
Colormap
Convolution
CurvatureFlow
Deconvolution
Denoising
#DiffusionTensorImage
DisplacementField
DistanceMap
FastMarching
FFT
GPUAnisotropicSmoothing
GPUImageFilterBase
GPUSmoothing
GPUThresholding
ImageCompare
ImageCompose
ImageFeature
ImageFilterBase
ImageFusion
ImageGradient
ImageGrid
ImageIntensity
ImageLabel
ImageSources
ImageStatistics
LabelMap
MathematicalMorphology
Path
QuadEdgeMeshFiltering
Smoothing
SpatialFunction
Thresholding
Eigen
#FEM
NarrowBand
NeuralNetworks
Optimizers
Optimizersv4
Polynomials
Statistics
Eigen
#FEM
NarrowBand
NeuralNetworks
Optimizers
Optimizersv4
Polynomials
Statistics
RegistrationCommon
#FEMRegistration
GPURegistrationCommon
GPUPDEDeformableRegistration
Metricsv4
PDEDeformableRegistration
RegistrationMethodsv4
RegistrationCommon
#FEMRegistration
GPURegistrationCommon
GPUPDEDeformableRegistration
Metricsv4
PDEDeformableRegistration
RegistrationMethodsv4
#BioCell
Classifiers
ConnectedComponents
DeformableMesh
KLMRegionGrowing
LabelVoting
LevelSets
LevelSetsv4
#LevelSetsv4Visualization
MarkovRandomFieldsClassifiers
RegionGrowing
SignedDistanceFunction
Voronoi
Watersheds
)
#BioCell
Classifiers
ConnectedComponents
DeformableMesh
KLMRegionGrowing
LabelVoting
LevelSets
LevelSetsv4
#LevelSetsv4Visualization
MarkovRandomFieldsClassifiers
RegionGrowing
SignedDistanceFunction
Voronoi
Watersheds
)
set(ITK_MODULES_CMAKE_CACHE)
foreach(ITK_MODULE ${ITK_ENABLED_MODULES})
list(APPEND ITK_MODULES_CMAKE_CACHE -DModule_ITK${ITK_MODULE}:BOOL=ON)
endforeach()
set(ITK_MODULES_CMAKE_CACHE)
foreach(ITK_MODULE ${ITK_ENABLED_MODULES})
list(APPEND ITK_MODULES_CMAKE_CACHE -DModule_ITK${ITK_MODULE}:BOOL=ON)
endforeach()
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(ITK ZLIB FFTW)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_LIBRARY)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(ITK ZLIB FFTW)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_LIBRARY)
# By default activate FFTW, but with an external fftw build
# These variables are used in ITK to initialize the value of the ITK_USE_FFTW_XXX options
if (WIN32)
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=OFF
-DUSE_FFTWD:BOOL=OFF
)
if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND ITK_SB_CONFIG
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=TRUE)
endif()
else()
# By default activate FFTW, but with an external fftw build
# These variables are used in ITK to initialize the value of the ITK_USE_FFTW_XXX options
if (WIN32)
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=OFF
-DUSE_FFTWD:BOOL=OFF
)
if(MSVC AND BUILD_SHARED_LIBS)
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=ON
-DUSE_FFTWD:BOOL=ON
-DUSE_SYSTEM_FFTW:BOOL=ON
)
ADD_SUPERBUILD_CMAKE_VAR(ITK FFTW_INCLUDE_PATH)
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=TRUE)
endif()
# forward compilation flags
set(ITK_SB_COMPILATION_FLAGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_STATIC_LINKER_FLAGS:STRING=${CMAKE_STATIC_LINKER_FLAGS}
else()
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=ON
-DUSE_FFTWD:BOOL=ON
-DUSE_SYSTEM_FFTW:BOOL=ON
)
#later used below for _SB_ITK_DIR and then in packaging
set(ITK_SB_VERSION 4.8)
set(ITK_SB_VERSION_FULL ${ITK_SB_VERSION}.1)
ADD_SUPERBUILD_CMAKE_VAR(ITK FFTW_INCLUDE_PATH)
endif()
ExternalProject_Add(ITK
PREFIX ITK
URL "http://sourceforge.net/projects/itk/files/itk/4.8/InsightToolkit-4.8.1.tar.gz/download"
URL_MD5 b1ed53604de854501cb61f34f410420e
SOURCE_DIR ${ITK_SB_SRC}
BINARY_DIR ${ITK_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
${ITK_SB_COMPILATION_FLAGS}
-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF
${ITK_MODULES_CMAKE_CACHE}
-DITKGroup_Core:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DITK_USE_SYSTEM_EXPAT:BOOL=ON
-DITK_USE_SYSTEM_ZLIB:BOOL=ON
-DITK_USE_SYSTEM_TIFF:BOOL=ON
-DITK_USE_SYSTEM_PNG:BOOL=ON
${ITK_SB_CONFIG}
DEPENDS ${ITK_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
# forward compilation flags
set(ITK_SB_COMPILATION_FLAGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_STATIC_LINKER_FLAGS:STRING=${CMAKE_STATIC_LINKER_FLAGS}
)
#later used below for _SB_ITK_DIR and then in packaging
set(ITK_SB_VERSION 4.8)
set(ITK_SB_VERSION_FULL ${ITK_SB_VERSION}.1)
ExternalProject_Add(ITK
PREFIX ITK
URL "http://sourceforge.net/projects/itk/files/itk/4.8/InsightToolkit-4.8.1.tar.gz/download"
URL_MD5 b1ed53604de854501cb61f34f410420e
SOURCE_DIR ${ITK_SB_SRC}
BINARY_DIR ${ITK_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
${ITK_SB_COMPILATION_FLAGS}
-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF
${ITK_MODULES_CMAKE_CACHE}
-DITKGroup_Core:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DITK_USE_SYSTEM_EXPAT:BOOL=ON
-DITK_USE_SYSTEM_ZLIB:BOOL=ON
-DITK_USE_SYSTEM_TIFF:BOOL=ON
-DITK_USE_SYSTEM_PNG:BOOL=ON
${ITK_SB_CONFIG}
DEPENDS ${ITK_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_ITK_DIR ${SB_INSTALL_PREFIX}/lib/cmake/ITK-${ITK_SB_VERSION})
set(_SB_ITK_DIR ${SB_INSTALL_PREFIX}/lib/cmake/ITK-${ITK_SB_VERSION})
INCLUDE_ONCE_MACRO(LIBKML)
SETUP_SUPERBUILD(PROJECT LIBKML)
SETUP_SUPERBUILD(PROJECT LIBKML)
# declare dependencies
##set(LIBKML_DEPENDENCIES EXPAT ZLIB BOOST)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(LIBKML EXPAT ZLIB BOOST)
# declare dependencies
##set(LIBKML_DEPENDENCIES EXPAT ZLIB BOOST)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(LIBKML EXPAT ZLIB BOOST)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML EXPAT_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML EXPAT_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML ZLIB_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML Boost_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML EXPAT_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML EXPAT_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML ZLIB_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(LIBKML Boost_INCLUDE_DIR)
ExternalProject_Add(LIBKML
PREFIX LIBKML
URL "http://ftp.de.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r863.orig.tar.gz"
URL_MD5 211ed5fdf2dd45aeb9c0abc8e1fe42be
BINARY_DIR ${LIBKML_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${LIBKML_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/LIBKML ${LIBKML_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${LIBKML_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
ExternalProject_Add(LIBKML
PREFIX LIBKML
URL "http://ftp.de.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r863.orig.tar.gz"
URL_MD5 211ed5fdf2dd45aeb9c0abc8e1fe42be
BINARY_DIR ${LIBKML_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${LIBKML_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/LIBKML ${LIBKML_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${LIBKML_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_LIBKML_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
list(APPEND _SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlbase.lib)
if(USE_SYSTEM_EXPAT)
list(APPEND _SB_LIBKML_BASE_LIBRARY ${EXPAT_LIBRARY})
else()
list(APPEND _SB_LIBKML_BASE_LIBRARY ${_SB_EXPAT_LIBRARY})
endif()
list(APPEND _SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/uriparser.lib)
set(_SB_LIBKML_CONVENIENCE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlconvenience.lib)
set(_SB_LIBKML_DOM_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmldom.lib)
set(_SB_LIBKML_ENGINE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlengine.lib)
set(_SB_LIBKML_REGIONATOR_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlregionator.lib)
set(_SB_LIBKML_XSD_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlxsd.lib)
set(_SB_LIBKML_MINIZIP_LIBRARY ${SB_INSTALL_PREFIX}/lib/minizip.lib)
elseif(UNIX)
set(_SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlbase${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_CONVENIENCE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlconvenience${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_DOM_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmldom${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_ENGINE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlengine${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_REGIONATOR_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlregionator${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_XSD_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlxsd${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_MINIZIP_LIBRARY ${SB_INSTALL_PREFIX}/lib/libminizip${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
list(APPEND _SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlbase.lib)
if(USE_SYSTEM_EXPAT)
list(APPEND _SB_LIBKML_BASE_LIBRARY ${EXPAT_LIBRARY})
else()
list(APPEND _SB_LIBKML_BASE_LIBRARY ${_SB_EXPAT_LIBRARY})
endif()
list(APPEND _SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/uriparser.lib)
set(_SB_LIBKML_CONVENIENCE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlconvenience.lib)
set(_SB_LIBKML_DOM_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmldom.lib)
set(_SB_LIBKML_ENGINE_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlengine.lib)
set(_SB_LIBKML_REGIONATOR_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlregionator.lib)
set(_SB_LIBKML_XSD_LIBRARY ${SB_INSTALL_PREFIX}/lib/kmlxsd.lib)
set(_SB_LIBKML_MINIZIP_LIBRARY ${SB_INSTALL_PREFIX}/lib/minizip.lib)
elseif(UNIX)
set(_SB_LIBKML_BASE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlbase${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_CONVENIENCE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlconvenience${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_DOM_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmldom${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_ENGINE_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlengine${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_REGIONATOR_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlregionator${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_XSD_LIBRARY ${SB_INSTALL_PREFIX}/lib/libkmlxsd${CMAKE_SHARED_LIBRARY_SUFFIX})
set(_SB_LIBKML_MINIZIP_LIBRARY ${SB_INSTALL_PREFIX}/lib/libminizip${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
......@@ -2,7 +2,6 @@ INCLUDE_ONCE_MACRO(LIBSVM)
SETUP_SUPERBUILD(PROJECT LIBSVM)
ExternalProject_Add(LIBSVM
PREFIX LIBSVM
URL "http://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.20.tar.gz"
......@@ -22,7 +21,6 @@ ExternalProject_Add(LIBSVM
${LIBSVM_SB_SRC}
)
set(_SB_LIBSVM_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_LIBSVM_LIBRARY ${SB_INSTALL_PREFIX}/lib/svm.lib)
......
INCLUDE_ONCE_MACRO(OPENSSL)
SETUP_SUPERBUILD(PROJECT OPENSSL)
SETUP_SUPERBUILD(PROJECT OPENSSL)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL ZLIB)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL ZLIB)
if(WIN32)
set(OPENSSL_BUILD_ARCH "linux-x32")
set(OPENSSL_BUILD_ARCH "VC-WIN32")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OPENSSL_BUILD_ARCH "linux-x86_64")
set(OPENSSL_BUILD_ARCH "VC-WIN64A")
endif()
if(WIN32)
set(OPENSSL_BUILD_ARCH "linux-x32")
set(OPENSSL_BUILD_ARCH "VC-WIN32")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OPENSSL_BUILD_ARCH "linux-x86_64")
set(OPENSSL_BUILD_ARCH "VC-WIN64A")
endif()
endif()
if(MSVC)
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
ExternalProject_Add(OPENSSL
PREFIX OPENSSL
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_0_1p.tar.gz"
URL_MD5 6bc1f9a9d9d474aceceb377e758e48ec
DEPENDS ${OPENSSL_DEPENDENCIES}
BINARY_DIR ${OPENSSL_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OPENSSL_SB_SRC} ${OPENSSL_SB_BUILD_DIR}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR}
perl Configure ${OPENSSL_BUILD_ARCH} no-asm --prefix=${CMAKE_WIN_INSTALL_PREFIX} --openssldir=${CMAKE_WIN_INSTALL_PREFIX}
BUILD_COMMAND ms/do_ms.bat
INSTALL_COMMAND nmake -f ms/ntdll.mak install
if(MSVC)
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
ExternalProject_Add(OPENSSL
PREFIX OPENSSL
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_0_1p.tar.gz"
URL_MD5 6bc1f9a9d9d474aceceb377e758e48ec
DEPENDS ${OPENSSL_DEPENDENCIES}
BINARY_DIR ${OPENSSL_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OPENSSL_SB_SRC} ${OPENSSL_SB_BUILD_DIR}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR}
perl Configure ${OPENSSL_BUILD_ARCH} no-asm --prefix=${CMAKE_WIN_INSTALL_PREFIX} --openssldir=${CMAKE_WIN_INSTALL_PREFIX}
BUILD_COMMAND ms/do_ms.bat
INSTALL_COMMAND nmake -f ms/ntdll.mak install
)
else(UNIX)
ExternalProject_Add(OPENSSL
PREFIX OPENSSL
DEPENDS ${OPENSSL_DEPENDENCIES}
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_0_1p.tar.gz"
URL_MD5 6bc1f9a9d9d474aceceb377e758e48ec
BINARY_DIR ${OPENSSL_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OPENSSL_SB_SRC} ${OPENSSL_SB_BUILD_DIR}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR} ./config ${OPENSSL_BUILD_ARCH}
--prefix=${SB_INSTALL_PREFIX} shared zlib zlib-dynamic -I${SB_INSTALL_PREFIX}/include -L${SB_INSTALL_PREFIX}/lib
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install)
else(UNIX)
ExternalProject_Add(OPENSSL
PREFIX OPENSSL
DEPENDS ${OPENSSL_DEPENDENCIES}
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_0_1p.tar.gz"
URL_MD5 6bc1f9a9d9d474aceceb377e758e48ec
BINARY_DIR ${OPENSSL_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OPENSSL_SB_SRC} ${OPENSSL_SB_BUILD_DIR}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR} ./config ${OPENSSL_BUILD_ARCH}
--prefix=${SB_INSTALL_PREFIX} shared zlib zlib-dynamic -I${SB_INSTALL_PREFIX}/include -L${SB_INSTALL_PREFIX}/lib
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install)
ExternalProject_Add_Step(OPENSSL remove_static
COMMAND ${CMAKE_COMMAND} -E remove
${SB_INSTALL_PREFIX}/lib/libssl.a
${SB_INSTALL_PREFIX}/lib/libcrypto.a
${SB_INSTALL_PREFIX}/bin/openssl
${SB_INSTALL_PREFIX}/bin/c_rehash
DEPENDEES install)
ExternalProject_Add_Step(OPENSSL remove_static
COMMAND ${CMAKE_COMMAND} -E remove
${SB_INSTALL_PREFIX}/lib/libssl.a
${SB_INSTALL_PREFIX}/lib/libcrypto.a
${SB_INSTALL_PREFIX}/bin/openssl
${SB_INSTALL_PREFIX}/bin/c_rehash
DEPENDEES install)
endif()
endif()
set(_SB_OPENSSL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_OPENSSL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libcurl.lib)
elseif(UNIX)
set(_SB_OPENSSL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libssl${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
set(_SB_OPENSSL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_OPENSSL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libcurl.lib)
elseif(UNIX)
set(_SB_OPENSSL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libssl${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
......@@ -2,7 +2,6 @@ INCLUDE_ONCE_MACRO(OSSIM)
SETUP_SUPERBUILD(PROJECT OSSIM)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OSSIM TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)
......
......@@ -30,43 +30,43 @@ if(OTB_USE_CURL)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB CURL)
endif()
if(OTB_USE_LIBKML)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB LIBKML)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB LIBKML)
endif()
if(OTB_USE_OPENCV)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB OPENCV)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB OPENCV)
endif()
if(OTB_USE_LIBSVM)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB LIBSVM)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB LIBSVM)
endif()
if(OTB_USE_MUPARSER)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB MUPARSER)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB MUPARSER)
endif()
if(OTB_USE_MUPARSERX)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB MUPARSERX)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB MUPARSERX)
endif()
if(OTB_WRAP_PYTHON OR OTB_WRAP_JAVA)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB SWIG)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB SWIG)
endif()
if(OTB_USE_QT4)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB QT4)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB QT4)
endif()
if(OTB_USE_GLEW)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLEW)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLEW)
endif()
if(OTB_USE_GLFW)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLFW)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLFW)
endif()
if(OTB_USE_GLUT)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLUT)
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GLUT)
endif()
ADD_SUPERBUILD_CMAKE_VAR(OTB GDAL_INCLUDE_DIR)
......@@ -104,8 +104,8 @@ ADD_SUPERBUILD_CMAKE_VAR(OTB LIBSVM_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OTB LIBSVM_LIBRARY)
if(OTB_USE_CURL)
ADD_SUPERBUILD_CMAKE_VAR(OTB CURL_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OTB CURL_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OTB CURL_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OTB CURL_LIBRARY)
endif()
if(MSVC)
......@@ -140,59 +140,59 @@ endif()
set(OTB_SB_C_FLAGS "${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_C_FLAGS}")
set(OTB_SB_CXX_FLAGS "${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_CXX_FLAGS}")
set(OTB_SB_COMPILATION_FLAGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS:STRING=${OTB_SB_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${OTB_SB_CXX_FLAGS}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_STATIC_LINKER_FLAGS:STRING=${CMAKE_STATIC_LINKER_FLAGS}
)
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS:STRING=${OTB_SB_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${OTB_SB_CXX_FLAGS}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_STATIC_LINKER_FLAGS:STRING=${CMAKE_STATIC_LINKER_FLAGS}
)
ExternalProject_Add(OTB
DEPENDS ${OTB_DEPENDENCIES}
PREFIX OTB
${OTB_HG_SOURCES}
SOURCE_DIR ${OTB_SB_SRC}
BINARY_DIR ${OTB_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${OTB_SB_COMPILATION_FLAGS}
-DBUILD_TESTING:BOOL=${BUILD_TESTING}
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DOTB_DATA_ROOT:STRING=${OTB_DATA_ROOT}
-DOTB_USE_6S:BOOL=${OTB_USE_6S}
-DOTB_USE_CURL:BOOL=${OTB_USE_CURL}
-DOTB_USE_LIBKML:BOOL=${OTB_USE_LIBKML}
-DOTB_USE_LIBSVM:BOOL=${OTB_USE_LIBSVM}
-DOTB_USE_MAPNIK:BOOL=${OTB_USE_MAPNIK}
-DOTB_USE_MUPARSER:BOOL=${OTB_USE_MUPARSER}
-DOTB_USE_MUPARSERX:BOOL=${OTB_USE_MUPARSERX}
-DOTB_USE_OPENCV:BOOL=${OTB_USE_OPENCV}
-DOTB_USE_OPENJPEG:BOOL=${OTB_USE_OPENJPEG}
-DOTB_USE_QT4:BOOL=${OTB_USE_QT4}
-DOTB_USE_SIFTFAST:BOOL=${OTB_USE_SIFTFAST}
-DOTB_USE_OPENGL:BOOL=${OTB_USE_OPENGL}
-DOTB_USE_GLEW:BOOL=${OTB_USE_GLEW}
-DOTB_USE_GLFW:BOOL=${OTB_USE_GLFW}
-DOTB_USE_GLUT:BOOL=${OTB_USE_GLUT}
${OTB_SB_CONFIG}
${OTB_SB_LARGEINPUT_CONFIG}
-DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
${OTB_ADDITIONAL_CACHE}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
DEPENDS ${OTB_DEPENDENCIES}
PREFIX OTB
${OTB_HG_SOURCES}
SOURCE_DIR ${OTB_SB_SRC}
BINARY_DIR ${OTB_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${OTB_SB_COMPILATION_FLAGS}
-DBUILD_TESTING:BOOL=${BUILD_TESTING}
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DOTB_DATA_ROOT:STRING=${OTB_DATA_ROOT}
-DOTB_USE_6S:BOOL=${OTB_USE_6S}
-DOTB_USE_CURL:BOOL=${OTB_USE_CURL}
-DOTB_USE_LIBKML:BOOL=${OTB_USE_LIBKML}
-DOTB_USE_LIBSVM:BOOL=${OTB_USE_LIBSVM}
-DOTB_USE_MAPNIK:BOOL=${OTB_USE_MAPNIK}
-DOTB_USE_MUPARSER:BOOL=${OTB_USE_MUPARSER}
-DOTB_USE_MUPARSERX:BOOL=${OTB_USE_MUPARSERX}
-DOTB_USE_OPENCV:BOOL=${OTB_USE_OPENCV}
-DOTB_USE_OPENJPEG:BOOL=${OTB_USE_OPENJPEG}
-DOTB_USE_QT4:BOOL=${OTB_USE_QT4}
-DOTB_USE_SIFTFAST:BOOL=${OTB_USE_SIFTFAST}
-DOTB_USE_OPENGL:BOOL=${OTB_USE_OPENGL}
-DOTB_USE_GLEW:BOOL=${OTB_USE_GLEW}
-DOTB_USE_GLFW:BOOL=${OTB_USE_GLFW}
-DOTB_USE_GLUT:BOOL=${OTB_USE_GLUT}
${OTB_SB_CONFIG}
${OTB_SB_LARGEINPUT_CONFIG}
-DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
${OTB_ADDITIONAL_CACHE}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
ExternalProject_Add_Step(OTB install_copyright
COMMAND ${CMAKE_COMMAND} -E copy_directory ${OTB_SB_SRC}/Copyright ${CMAKE_INSTALL_PREFIX}/share/copyright
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Copyright ${CMAKE_INSTALL_PREFIX}/share/copyright
DEPENDEES install)
# detect OTB version number
if (SUPERBUILD_OTB_VERSION)
set(_SB_OTB_DIR ${SB_INSTALL_PREFIX}/lib/cmake/OTB-${SUPERBUILD_OTB_VERSION_MAJOR}.${SUPERBUILD_OTB_VERSION_MINOR})
else()
set(_SB_OTB_DIR ${SB_INSTALL_PREFIX})
endif()
# detect OTB version number