Commit 36b6e22d authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: macro for inlude file only once

parent 7f30feb2
......@@ -4,16 +4,10 @@
# support both libraries. See the related changeset in OTB trunk:
# http://hg.orfeo-toolbox.org/OTB/r# ev/8da67e36c78d
if(NOT __EXTERNAL_BOOST__)
set(__EXTERNAL_BOOST__ 1)
INCLUDE_ONCE_MACRO(BOOST)
if(USE_SYSTEM_BOOST)
message(STATUS " Using Boost system version")
else()
SETUP_SUPERBUILD(PROJECT BOOST)
message(STATUS " Using Boost superbuild version")
option(SUPERBUILD_BOOST_HEADER_ONLY "Only use Boost headers" ON)
mark_as_advanced(SUPERBUILD_BOOST_HEADER_ONLY)
......@@ -61,7 +55,6 @@ else()
)
endif()
message(STATUS " Using Boost SuperBuild version")
else(MSVC)
#TODO: find hash for archives properly
......@@ -127,6 +120,3 @@ else()
set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
set(_SB_Boost_LIBRARY_DIR ${SB_INSTALL_PREFIX}/lib)
endif()
endif()
if( __EXTERNAL_CURL__)
return()
else()
set(__EXTERNAL_CURL__ 1)
endif()
if(USE_SYSTEM_CURL)
message(STATUS " Using cURL system version")
return()
endif()
INCLUDE_ONCE_MACRO(CURL)
SETUP_SUPERBUILD(PROJECT CURL)
message(STATUS " Using cURL SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL ZLIB)
......@@ -45,10 +35,7 @@ else(UNIX)
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
${SB_CMAKE_CACHE_ARGS}
-DBUILD_CURL_TESTS:BOOL=OFF
-DBUILD_CURL_EXE:BOOL=ON
-DCMAKE_USE_OPENSSL:BOOL=${SB_ENABLE_OPENSSL_CURL}
......
if( __EXTERNAL_EXPAT__)
return()
else()
set(__EXTERNAL_EXPAT__ 1)
endif()
if(USE_SYSTEM_EXPAT)
message(STATUS " Using Expat system version")
return()
endif()
INCLUDE_ONCE_MACRO(EXPAT)
SETUP_SUPERBUILD(PROJECT EXPAT)
message(STATUS " Using Expat SuperBuild version")
ExternalProject_Add(EXPAT
PREFIX EXPAT
......@@ -20,9 +10,7 @@ ExternalProject_Add(EXPAT
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
${SB_CMAKE_CACHE_ARGS}
-DBUILD_examples:BOOL=OFF
-DBUILD_tests:BOOL=OFF
-DBUILD_tools:BOOL=OFF
......
if( __EXTERNAL_FFTW__)
return()
else()
set(__EXTERNAL_FFTW__ 1)
endif()
if(USE_SYSTEM_FFTW)
message(STATUS " Using FFTW system version")
return()
endif()
INCLUDE_ONCE_MACRO(FFTW)
SETUP_SUPERBUILD(PROJECT FFTW)
......@@ -22,7 +13,6 @@ if(MSVC)
endif()
message(STATUS " Using FFTW SuperBuild version")
# Compile the float version of FFTW
ExternalProject_Add(FFTWF
......
if( __EXTERNAL_FREETYPE__)
return()
else()
set(__EXTERNAL_FREETYPE__ 1)
endif()
if(USE_SYSTEM_FREETYPE)
message(STATUS " Using FreeType system version")
return()
endif()
INCLUDE_ONCE_MACRO(FREETYPE)
SETUP_SUPERBUILD(PROJECT FREETYPE)
message(STATUS " Using FreeType SuperBuild version")
set(FREETYPE_SB_CONFIG)
if(MSVC AND BUILD_SHARED_LIBS)
......@@ -26,7 +15,10 @@ ExternalProject_Add(FREETYPE
BINARY_DIR ${FREETYPE_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_COMMAND ${SB_CMAKE_COMMAND} ${FREETYPE_SB_CONFIG}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
${FREETYPE_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_FREETYPE_INCLUDE_DIRS ${SB_INSTALL_PREFIX}/include/freetype2)
......
if( __EXTERNAL_GDAL__)
return()
else()
set(__EXTERNAL_GDAL__ 1)
endif()
if(USE_SYSTEM_GDAL)
message(STATUS " Using GDAL system version")
return()
endif()
INCLUDE_ONCE_MACRO(GDAL)
SETUP_SUPERBUILD(PROJECT GDAL)
message(STATUS " Using GDAL SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL TIFF CURL GEOTIFF PNG JPEG OPENJPEG SQLITE GEOS ZLIB EXPAT)
......
if( __EXTERNAL_GEOS__)
return()
else()
set(__EXTERNAL_GEOS__ 1)
endif()
if(USE_SYSTEM_GEOS)
message(STATUS " Using GEOS system version")
return()
endif()
INCLUDE_ONCE_MACRO(GEOS)
SETUP_SUPERBUILD(PROJECT GEOS)
message(STATUS " Using GEOS SuperBuild version")
ExternalProject_Add(GEOS
PREFIX GEOS
......@@ -21,6 +11,7 @@ ExternalProject_Add(GEOS
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_TESTING:BOOL=OFF
-DGEOS_ENABLE_TESTS:BOOL=OFF
CMAKE_COMMAND ${SB_CMAKE_COMMAND} )
......
if( __EXTERNAL_GEOTIFF__)
return()
else()
set(__EXTERNAL_GEOTIFF__ 1)
endif()
if(USE_SYSTEM_GEOTIFF)
message(STATUS " Using GeoTIFF system version")
return()
endif()
INCLUDE_ONCE_MACRO(GEOTIFF)
SETUP_SUPERBUILD(PROJECT GEOTIFF)
message(STATUS " Using GeoTIFF SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GEOTIFF TIFF PROJ JPEG ZLIB)
......@@ -66,6 +56,7 @@ else()
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${GEOTIFF_DEPENDENCIES}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_TESTING:BOOL=OFF
-DPROJ4_OSGEO4W_HOME:PATH=${SB_INSTALL_PREFIX}
${GEOTIFF_SB_CONFIG}
......
if(NOT __EXTERNAL_GLEW__)
set(__EXTERNAL_GLEW__ 1)
INCLUDE_ONCE_MACRO(GLEW)
if(USE_SYSTEM_GLEW)
message(STATUS " Using GLEW system version")
else()
SETUP_SUPERBUILD(PROJECT GLEW)
message(STATUS " Using GLEW SuperBuild version")
SETUP_SUPERBUILD(PROJECT GLEW)
if(UNIX)
ExternalProject_Add(GLEW
PREFIX GLEW
URL "https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.tgz/download"
URL_MD5 7cbada3166d2aadfc4169c4283701066
BINARY_DIR ${GLEW_SB_BUILD_DIR}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
DEPENDS ${GLEW_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GLEW/CMakeLists.txt
${GLEW_SB_SRC}
)
if(UNIX)
ExternalProject_Add(GLEW
PREFIX GLEW
URL "https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0.tgz/download"
URL_MD5 7cbada3166d2aadfc4169c4283701066
BINARY_DIR ${GLEW_SB_BUILD_DIR}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
DEPENDS ${GLEW_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GLEW/CMakeLists.txt
${GLEW_SB_SRC}
)
elseif(MSVC)
set(SB_GLEW_DIR "Release/Win32")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SB_GLEW_DIR "Release/x64")
endif()
ExternalProject_Add(GLEW
PREFIX GLEW
URL "https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0-win32.zip/download"
URL_MD5 a2c0e4d75bdb84217550e51c0f1e7090
BINARY_DIR ${GLEW_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GLEW_SB_SRC}/include ${CMAKE_INSTALL_PREFIX}/include
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/lib/${SB_GLEW_DIR}/glew32s.lib ${CMAKE_INSTALL_PREFIX}/lib
BUILD_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/lib/${SB_GLEW_DIR}/glew32.lib ${CMAKE_INSTALL_PREFIX}/lib
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/bin/${SB_GLEW_DIR}/glew32.dll ${CMAKE_INSTALL_PREFIX}/bin/
)
message(STATUS " Pre-built binaries of GLEW are used for MSVC")
endif()
set(_SB_GLEW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libGLEW.lib)
elseif(UNIX)
set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libGLEW${CMAKE_SHARED_LIBRARY_SUFFIX})
elseif(MSVC)
set(SB_GLEW_DIR "Release/Win32")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SB_GLEW_DIR "Release/x64")
endif()
ExternalProject_Add(GLEW
PREFIX GLEW
URL "https://sourceforge.net/projects/glew/files/glew/1.13.0/glew-1.13.0-win32.zip/download"
URL_MD5 a2c0e4d75bdb84217550e51c0f1e7090
BINARY_DIR ${GLEW_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GLEW_SB_SRC}/include ${CMAKE_INSTALL_PREFIX}/include
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/lib/${SB_GLEW_DIR}/glew32s.lib ${CMAKE_INSTALL_PREFIX}/lib
BUILD_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/lib/${SB_GLEW_DIR}/glew32.lib ${CMAKE_INSTALL_PREFIX}/lib
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${GLEW_SB_SRC}/bin/${SB_GLEW_DIR}/glew32.dll ${CMAKE_INSTALL_PREFIX}/bin/
)
message(STATUS " Pre-built binaries of GLEW are used for MSVC")
endif()
set(_SB_GLEW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libGLEW.lib)
elseif(UNIX)
set(_SB_GLEW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libGLEW${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
if(NOT __EXTERNAL_GLFW__w)
set(__EXTERNAL_GLFW__ 1)
INCLUDE_ONCE_MACRO(GLFW)
if(USE_SYSTEM_GLFW)
message(STATUS " Using GLFW system version")
else()
SETUP_SUPERBUILD(PROJECT GLFW)
message(STATUS " Using GLFW SuperBuild version")
SETUP_SUPERBUILD(PROJECT GLFW)
ExternalProject_Add(GLFW
PREFIX GLFW
URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
URL_MD5 8023327bfe979b3fe735e449e2f54842
BINARY_DIR ${GLFW_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DGLFW_BUILD_EXAMPLES:BOOL=OFF
-DGLFW_BUILD_DOCS:BOOL=OFF
-DGLFW_BUILD_TESTS:BOOL=OFF
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
ExternalProject_Add(GLFW
PREFIX GLFW
URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
URL_MD5 8023327bfe979b3fe735e449e2f54842
BINARY_DIR ${GLFW_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DGLFW_BUILD_EXAMPLES:BOOL=OFF
-DGLFW_BUILD_DOCS:BOOL=OFF
-DGLFW_BUILD_TESTS:BOOL=OFF
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_GLFW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLFW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw.lib)
elseif(UNIX)
set(_SB_GLFW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
endif()
set(_SB_GLFW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLFW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw.lib)
elseif(UNIX)
set(_SB_GLFW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
if(NOT __EXTERNAL_GLUT__)
set(__EXTERNAL_GLUT__ 1)
INCLUDE_ONCE_MACRO(GLUT)
if(USE_SYSTEM_GLUT)
message(STATUS " Using GLUT system version")
else()
if(APPLE)
message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
endif()
if(APPLE)
message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
retunr()
endif()
SETUP_SUPERBUILD(PROJECT GLUT)
message(STATUS " Using GLUT SuperBuild version")
SETUP_SUPERBUILD(PROJECT GLUT)
ExternalProject_Add(GLUT
PREFIX GLUT
URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
URL_MD5 918ffbddcffbac83c218bc52355b6d5a
BINARY_DIR ${GLUT_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
${GLUT_SB_SRC}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
ExternalProject_Add(GLUT
PREFIX GLUT
URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
URL_MD5 918ffbddcffbac83c218bc52355b6d5a
BINARY_DIR ${GLUT_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
${GLUT_SB_SRC}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_GLUT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut.lib)
elseif(UNIX)
set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
message(STATUS " Using glut SuperBuild version")
endif()
set(_SB_GLUT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut.lib)
elseif(UNIX)
set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
if(NOT __EXTERNAL_ITK__)
set(__EXTERNAL_ITK__ 1)
INCLUDE_ONCE_MACRO(ITK)
if(USE_SYSTEM_ITK)
message(STATUS " Using ITK system version")
else()
SETUP_SUPERBUILD(PROJECT ITK)
message(STATUS " Using ITK SuperBuild version")
# if(MSVC)
# set(ITK_SB_SRC "C:/Temp/ITK")
......@@ -149,6 +144,7 @@ else()
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}
......@@ -165,6 +161,3 @@ else()
)
set(_SB_ITK_DIR ${SB_INSTALL_PREFIX}/lib/cmake/ITK-${ITK_SB_VERSION})
endif()
endif()
if( __EXTERNAL_JPEG__)
return()
else()
set(__EXTERNAL_JPEG__ 1)
endif()
if(USE_SYSTEM_JPEG)
message(STATUS " Using libjpeg system version")
return()
endif()
INCLUDE_ONCE_MACRO(JPEG)
SETUP_SUPERBUILD(PROJECT JPEG)
message(STATUS " Using libjpeg SuperBuild version")
if(WIN32)
set(JPEG_PATCH_COMMAND ${CMAKE_COMMAND}
......
if(NOT __EXTERNAL_LIBKML__)
set(__EXTERNAL_LIBKML__ 1)
INCLUDE_ONCE_MACRO(LIBKML)
if(USE_SYSTEM_LIBKML)
message(STATUS " Using libKML system version")
else()
SETUP_SUPERBUILD(PROJECT LIBKML)
message(STATUS " Using libKML SuperBuild version")
# declare dependencies
##set(LIBKML_DEPENDENCIES EXPAT ZLIB BOOST)
......@@ -60,6 +55,3 @@ else()
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()
endif()
endif()
if( __EXTERNAL_LIBSVM__)
return()
else()
set(__EXTERNAL_LIBSVM__ 1)
endif()
if(USE_SYSTEM_LIBSVM)
message(STATUS " Using LibSVM system version")
return()
endif()
INCLUDE_ONCE_MACRO(LIBSVM)
SETUP_SUPERBUILD(PROJECT LIBSVM)
message(STATUS " Using LibSVM SuperBuild version")
ExternalProject_Add(LIBSVM
PREFIX LIBSVM
......
if( __EXTERNAL_MUPARSER__)
return()
else()
set(__EXTERNAL_MUPARSER__ 1)
endif()
if(USE_SYSTEM_MUPARSER)
message(STATUS " Using muParser system version")
return()
endif()
INCLUDE_ONCE_MACRO(MUPARSER)
SETUP_SUPERBUILD(PROJECT MUPARSER)
message(STATUS " Using muParser SuperBuild version")
ExternalProject_Add(MUPARSER
PREFIX MUPARSER
......
if( __EXTERNAL_MUPARSERX__)
return()
else()
set(__EXTERNAL_MUPARSERX__ 1)
endif()
if(USE_SYSTEM_MUPARSERX)
message(STATUS " Using muParserX system version")
return()
endif()
INCLUDE_ONCE_MACRO(MUPARSERX)
SETUP_SUPERBUILD(PROJECT MUPARSERX)
message(STATUS " Using muParserX SuperBuild version")
set(MUPARSERX_FLAGS)
if(APPLE)
......
if(NOT __EXTERNAL_MVD__)
set(__EXTERNAL_MVD__ 1)
if( __EXTERNAL_MVD__)
return()
else()
set(__EXTERNAL_MVD__ 1)
endif()
SETUP_SUPERBUILD(PROJECT MVD)
message(STATUS " Using Monteverdi SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MVD OTB QWT QT4)
......@@ -34,5 +36,3 @@ ExternalProject_Add(MVD
${MVD_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
endif()
if(NOT __EXTERNAL_OPENCV__)
set(__EXTERNAL_OPENCV__ 1)
INCLUDE_ONCE_MACRO(OPENCV)
if(USE_SYSTEM_OPENCV)
message(STATUS " Using OpenCV system version")
else()
SETUP_SUPERBUILD(PROJECT OPENCV)
message(STATUS " Using OpenCV SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENCV ZLIB TIFF PNG)
......@@ -76,5 +72,3 @@ else()
endif()
set(_SB_OpenCV_DIR ${SB_INSTALL_PREFIX}/share/OpenCV)
endif()
endif()
if( __EXTERNAL_OPENJPEG__)
return()
else()
set(__EXTERNAL_OPENJPEG__ 1)
endif()
if(USE_SYSTEM_OPENJPEG)
message(STATUS " Using OpenJPEG system version")
return()
endif()
INCLUDE_ONCE_MACRO(OPENJPEG)
SETUP_SUPERBUILD(PROJECT OPENJPEG)
message(STATUS " Using OpenJPEG SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENJPEG ZLIB TIFF PNG)
......
if(NOT __EXTERNAL_OPENSSL__)
set(__EXTERNAL_OPENSSL__ 1)
#RK: OPENSSL is deactivated in QT4 build.
#revisit that when you have a clean openssl
if(USE_SYSTEM_OPENSSL)
message(STATUS " Using OpenSSL system version")
else()
INCLUDE_ONCE_MACRO(OPENSSL)
SETUP_SUPERBUILD(PROJECT OPENSSL)
message(STATUS " Using OpenSSL SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL ZLIB)
......@@ -74,6 +67,3 @@ else()
elseif(UNIX)
set(_SB_OPENSSL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libssl${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
endif()
endif()
if( __EXTERNAL_OPENTHREADS__)
return()
else()
set(__EXTERNAL_OPENTHREADS__ 1)
endif()
if(USE_SYSTEM_OPENTHREADS)
message(STATUS " Using OpenThreads system version")
return()
endif()
INCLUDE_ONCE_MACRO(OPENTHREADS)