Commit 7a23cbec authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

Revert "SuperBuild: macro for inlude file only once"

This reverts commit 914cafbf.
parent 1abffad8
......@@ -4,10 +4,16 @@
# support both libraries. See the related changeset in OTB trunk:
# http://hg.orfeo-toolbox.org/OTB/r# ev/8da67e36c78d
INCLUDE_ONCE_MACRO(BOOST)
if(NOT __EXTERNAL_BOOST__)
set(__EXTERNAL_BOOST__ 1)
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)
......@@ -55,6 +61,7 @@ INCLUDE_ONCE_MACRO(BOOST)
)
endif()
message(STATUS " Using Boost SuperBuild version")
else(MSVC)
#TODO: find hash for archives properly
......@@ -120,3 +127,6 @@ INCLUDE_ONCE_MACRO(BOOST)
set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
set(_SB_Boost_LIBRARY_DIR ${SB_INSTALL_PREFIX}/lib)
endif()
endif()
INCLUDE_ONCE_MACRO(CURL)
if( __EXTERNAL_CURL__)
return()
else()
set(__EXTERNAL_CURL__ 1)
endif()
if(USE_SYSTEM_CURL)
message(STATUS " Using cURL system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT CURL)
message(STATUS " Using cURL SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL ZLIB)
......@@ -35,7 +45,10 @@ else(UNIX)
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_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
-DBUILD_CURL_TESTS:BOOL=OFF
-DBUILD_CURL_EXE:BOOL=ON
-DCMAKE_USE_OPENSSL:BOOL=${SB_ENABLE_OPENSSL_CURL}
......
INCLUDE_ONCE_MACRO(EXPAT)
if( __EXTERNAL_EXPAT__)
return()
else()
set(__EXTERNAL_EXPAT__ 1)
endif()
if(USE_SYSTEM_EXPAT)
message(STATUS " Using Expat system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT EXPAT)
message(STATUS " Using Expat SuperBuild version")
ExternalProject_Add(EXPAT
PREFIX EXPAT
......@@ -10,7 +20,9 @@ ExternalProject_Add(EXPAT
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_examples:BOOL=OFF
-DBUILD_tests:BOOL=OFF
-DBUILD_tools:BOOL=OFF
......
INCLUDE_ONCE_MACRO(FFTW)
if( __EXTERNAL_FFTW__)
return()
else()
set(__EXTERNAL_FFTW__ 1)
endif()
if(USE_SYSTEM_FFTW)
message(STATUS " Using FFTW system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT FFTW)
......@@ -13,6 +22,7 @@ if(MSVC)
endif()
message(STATUS " Using FFTW SuperBuild version")
# Compile the float version of FFTW
ExternalProject_Add(FFTWF
......
INCLUDE_ONCE_MACRO(FREETYPE)
if( __EXTERNAL_FREETYPE__)
return()
else()
set(__EXTERNAL_FREETYPE__ 1)
endif()
if(USE_SYSTEM_FREETYPE)
message(STATUS " Using FreeType system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT FREETYPE)
message(STATUS " Using FreeType SuperBuild version")
set(FREETYPE_SB_CONFIG)
if(MSVC AND BUILD_SHARED_LIBS)
......@@ -15,10 +26,7 @@ ExternalProject_Add(FREETYPE
BINARY_DIR ${FREETYPE_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
${FREETYPE_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
CMAKE_COMMAND ${SB_CMAKE_COMMAND} ${FREETYPE_SB_CONFIG}
)
set(_SB_FREETYPE_INCLUDE_DIRS ${SB_INSTALL_PREFIX}/include/freetype2)
......
INCLUDE_ONCE_MACRO(GDAL)
if( __EXTERNAL_GDAL__)
return()
else()
set(__EXTERNAL_GDAL__ 1)
endif()
if(USE_SYSTEM_GDAL)
message(STATUS " Using GDAL system version")
return()
endif()
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)
......
INCLUDE_ONCE_MACRO(GEOS)
if( __EXTERNAL_GEOS__)
return()
else()
set(__EXTERNAL_GEOS__ 1)
endif()
if(USE_SYSTEM_GEOS)
message(STATUS " Using GEOS system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT GEOS)
message(STATUS " Using GEOS SuperBuild version")
ExternalProject_Add(GEOS
PREFIX GEOS
......@@ -11,7 +21,6 @@ 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} )
......
INCLUDE_ONCE_MACRO(GEOTIFF)
if( __EXTERNAL_GEOTIFF__)
return()
else()
set(__EXTERNAL_GEOTIFF__ 1)
endif()
if(USE_SYSTEM_GEOTIFF)
message(STATUS " Using GeoTIFF system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT GEOTIFF)
message(STATUS " Using GeoTIFF SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GEOTIFF TIFF PROJ JPEG ZLIB)
......@@ -56,7 +66,6 @@ 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}
......
INCLUDE_ONCE_MACRO(GLEW)
if(NOT __EXTERNAL_GLEW__)
set(__EXTERNAL_GLEW__ 1)
SETUP_SUPERBUILD(PROJECT GLEW)
if(USE_SYSTEM_GLEW)
message(STATUS " Using GLEW system version")
else()
SETUP_SUPERBUILD(PROJECT GLEW)
message(STATUS " Using GLEW SuperBuild version")
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}
)
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}
)
elseif(MSVC)
set(SB_GLEW_DIR "Release/Win32")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SB_GLEW_DIR "Release/x64")
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()
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})
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()
endif()
endif()
INCLUDE_ONCE_MACRO(GLFW)
if(NOT __EXTERNAL_GLFW__w)
set(__EXTERNAL_GLFW__ 1)
SETUP_SUPERBUILD(PROJECT GLFW)
if(USE_SYSTEM_GLFW)
message(STATUS " Using GLFW system version")
else()
SETUP_SUPERBUILD(PROJECT GLFW)
message(STATUS " Using GLFW SuperBuild version")
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}
)
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}
)
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()
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()
endif()
INCLUDE_ONCE_MACRO(GLUT)
if(NOT __EXTERNAL_GLUT__)
set(__EXTERNAL_GLUT__ 1)
if(APPLE)
message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
retunr()
endif()
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()
SETUP_SUPERBUILD(PROJECT GLUT)
SETUP_SUPERBUILD(PROJECT GLUT)
message(STATUS " Using GLUT SuperBuild version")
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}
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}
)
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()
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()
endif()
INCLUDE_ONCE_MACRO(ITK)
if(NOT __EXTERNAL_ITK__)
set(__EXTERNAL_ITK__ 1)
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")
......@@ -144,7 +149,6 @@ INCLUDE_ONCE_MACRO(ITK)
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}
......@@ -161,3 +165,6 @@ INCLUDE_ONCE_MACRO(ITK)
)
set(_SB_ITK_DIR ${SB_INSTALL_PREFIX}/lib/cmake/ITK-${ITK_SB_VERSION})
endif()
endif()
INCLUDE_ONCE_MACRO(JPEG)
if( __EXTERNAL_JPEG__)
return()
else()
set(__EXTERNAL_JPEG__ 1)
endif()
if(USE_SYSTEM_JPEG)
message(STATUS " Using libjpeg system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT JPEG)
message(STATUS " Using libjpeg SuperBuild version")
if(WIN32)
set(JPEG_PATCH_COMMAND ${CMAKE_COMMAND}
......
INCLUDE_ONCE_MACRO(LIBKML)
if(NOT __EXTERNAL_LIBKML__)
set(__EXTERNAL_LIBKML__ 1)
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)
......@@ -55,3 +60,6 @@ INCLUDE_ONCE_MACRO(LIBKML)
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()
INCLUDE_ONCE_MACRO(LIBSVM)
if( __EXTERNAL_LIBSVM__)
return()
else()
set(__EXTERNAL_LIBSVM__ 1)
endif()
SETUP_SUPERBUILD(PROJECT LIBSVM)
if(USE_SYSTEM_LIBSVM)
message(STATUS " Using LibSVM system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT LIBSVM)
message(STATUS " Using LibSVM SuperBuild version")
ExternalProject_Add(LIBSVM
PREFIX LIBSVM
......
INCLUDE_ONCE_MACRO(MUPARSER)
if( __EXTERNAL_MUPARSER__)
return()
else()
set(__EXTERNAL_MUPARSER__ 1)
endif()
if(USE_SYSTEM_MUPARSER)
message(STATUS " Using muParser system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT MUPARSER)
message(STATUS " Using muParser SuperBuild version")
ExternalProject_Add(MUPARSER
PREFIX MUPARSER
......
INCLUDE_ONCE_MACRO(MUPARSERX)
if( __EXTERNAL_MUPARSERX__)
return()
else()
set(__EXTERNAL_MUPARSERX__ 1)
endif()
if(USE_SYSTEM_MUPARSERX)
message(STATUS " Using muParserX system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT MUPARSERX)
message(STATUS " Using muParserX SuperBuild version")
set(MUPARSERX_FLAGS)
if(APPLE)
......
if( __EXTERNAL_MVD__)
return()
else()
set(__EXTERNAL_MVD__ 1)
endif()
if(NOT __EXTERNAL_MVD__)
set(__EXTERNAL_MVD__ 1)
SETUP_SUPERBUILD(PROJECT MVD)
message(STATUS " Using Monteverdi SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MVD OTB QWT QT4)
......@@ -36,3 +34,5 @@ ExternalProject_Add(MVD
${MVD_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
endif()
INCLUDE_ONCE_MACRO(OPENCV)
if(NOT __EXTERNAL_OPENCV__)
set(__EXTERNAL_OPENCV__ 1)
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)
......@@ -72,3 +76,5 @@ INCLUDE_ONCE_MACRO(OPENCV)
endif()
set(_SB_OpenCV_DIR ${SB_INSTALL_PREFIX}/share/OpenCV)
endif()
endif()
INCLUDE_ONCE_MACRO(OPENJPEG)
if( __EXTERNAL_OPENJPEG__)
return()
else()
set(__EXTERNAL_OPENJPEG__ 1)
endif()
if(USE_SYSTEM_OPENJPEG)
message(STATUS " Using OpenJPEG system version")
return()
endif()
SETUP_SUPERBUILD(PROJECT OPENJPEG)
message(STATUS " Using OpenJPEG SuperBuild version")
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENJPEG ZLIB TIFF PNG)
......