Commit 2ad895bc authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: single argument macro always

parent 33b18633
......@@ -6,7 +6,7 @@
INCLUDE_ONCE_MACRO(BOOST)
SETUP_SUPERBUILD(PROJECT BOOST)
SETUP_SUPERBUILD(BOOST)
option(SUPERBUILD_BOOST_HEADER_ONLY "Only use Boost headers" ON)
mark_as_advanced(SUPERBUILD_BOOST_HEADER_ONLY)
......
INCLUDE_ONCE_MACRO(CURL)
SETUP_SUPERBUILD(PROJECT CURL)
SETUP_SUPERBUILD(CURL)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL ZLIB)
......
INCLUDE_ONCE_MACRO(EXPAT)
SETUP_SUPERBUILD(PROJECT EXPAT)
SETUP_SUPERBUILD(EXPAT)
ExternalProject_Add(EXPAT
PREFIX EXPAT
......
INCLUDE_ONCE_MACRO(FFTW)
SETUP_SUPERBUILD(PROJECT FFTW)
SETUP_SUPERBUILD(FFTW)
set(FFTWF_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWF)
set(FFTWD_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWD)
......
INCLUDE_ONCE_MACRO(FREETYPE)
SETUP_SUPERBUILD(PROJECT FREETYPE)
SETUP_SUPERBUILD(FREETYPE)
set(FREETYPE_SB_CONFIG)
if(MSVC AND BUILD_SHARED_LIBS)
......@@ -18,7 +18,7 @@ ExternalProject_Add(FREETYPE
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
${FREETYPE_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
set(_SB_FREETYPE_INCLUDE_DIRS ${SB_INSTALL_PREFIX}/include/freetype2)
......
INCLUDE_ONCE_MACRO(GDAL)
SETUP_SUPERBUILD(PROJECT GDAL)
SETUP_SUPERBUILD(GDAL)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL TIFF CURL GEOTIFF PNG JPEG OPENJPEG SQLITE GEOS ZLIB EXPAT)
......
INCLUDE_ONCE_MACRO(GEOTIFF)
SETUP_SUPERBUILD(PROJECT GEOTIFF)
SETUP_SUPERBUILD(GEOTIFF)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GEOTIFF TIFF PROJ JPEG ZLIB)
......
INCLUDE_ONCE_MACRO(GLEW)
SETUP_SUPERBUILD(PROJECT GLEW)
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
SOURCE_DIR ${GLEW_SB_SRC}
BINARY_DIR ${GLEW_SB_BUILD_DIR}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${SB_CMAKE_COMMAND} ${GLEW_SB_SRC}/build/cmake/ ${SB_CMAKE_CACHE_ARGS} -DBUILD_UTILS:BOOL=OFF
)
SETUP_SUPERBUILD(GLEW)
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
SOURCE_DIR ${GLEW_SB_SRC}
BINARY_DIR ${GLEW_SB_BUILD_DIR}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${SB_CMAKE_COMMAND} ${GLEW_SB_SRC}/build/cmake/ ${SB_CMAKE_CACHE_ARGS} -DBUILD_UTILS:BOOL=OFF
)
set(_SB_GLEW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
......
INCLUDE_ONCE_MACRO(GLFW)
SETUP_SUPERBUILD(PROJECT GLFW)
SETUP_SUPERBUILD(GLFW)
ExternalProject_Add(GLFW
PREFIX GLFW
......@@ -23,4 +23,3 @@ if(WIN32)
elseif(UNIX)
set(_SB_GLFW_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
......@@ -5,7 +5,7 @@ if(APPLE)
retunr()
endif()
SETUP_SUPERBUILD(PROJECT GLUT)
SETUP_SUPERBUILD(GLUT)
ExternalProject_Add(GLUT
PREFIX GLUT
......@@ -27,4 +27,3 @@ if(WIN32)
elseif(UNIX)
set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
INCLUDE_ONCE_MACRO(ITK)
SETUP_SUPERBUILD(PROJECT ITK)
SETUP_SUPERBUILD(ITK)
# if(MSVC)
# set(ITK_SB_SRC "C:/Temp/ITK")
......
INCLUDE_ONCE_MACRO(JPEG)
SETUP_SUPERBUILD(PROJECT JPEG)
SETUP_SUPERBUILD(JPEG)
if(WIN32)
set(JPEG_PATCH_COMMAND ${CMAKE_COMMAND}
......
INCLUDE_ONCE_MACRO(LIBKML)
SETUP_SUPERBUILD(PROJECT LIBKML)
SETUP_SUPERBUILD(LIBKML)
# declare dependencies
##set(LIBKML_DEPENDENCIES EXPAT ZLIB BOOST)
......@@ -21,7 +21,7 @@ ExternalProject_Add(LIBKML
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 ${SB_CMAKE_CACHE_ARGS}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
${LIBKML_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
......
INCLUDE_ONCE_MACRO(LIBSVM)
SETUP_SUPERBUILD(PROJECT LIBSVM)
SETUP_SUPERBUILD(LIBSVM)
ExternalProject_Add(LIBSVM
PREFIX LIBSVM
......
INCLUDE_ONCE_MACRO(MUPARSER)
SETUP_SUPERBUILD(PROJECT MUPARSER)
SETUP_SUPERBUILD(MUPARSER)
ExternalProject_Add(MUPARSER
PREFIX MUPARSER
......
INCLUDE_ONCE_MACRO(MUPARSERX)
SETUP_SUPERBUILD(PROJECT MUPARSERX)
SETUP_SUPERBUILD(MUPARSERX)
set(MUPARSERX_FLAGS)
if(APPLE)
......
......@@ -4,7 +4,7 @@ else()
set(__EXTERNAL_MVD__ 1)
endif()
SETUP_SUPERBUILD(PROJECT MVD)
SETUP_SUPERBUILD(MVD)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MVD OTB QWT QT4)
......
INCLUDE_ONCE_MACRO(OPENCV)
SETUP_SUPERBUILD(PROJECT OPENCV)
SETUP_SUPERBUILD(OPENCV)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENCV ZLIB TIFF PNG)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENCV ZLIB TIFF PNG)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV ZLIB_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV TIFF_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV TIFF_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV PNG_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV PNG_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV ZLIB_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV TIFF_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV TIFF_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV PNG_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(OPENCV PNG_LIBRARY)
ExternalProject_Add(OPENCV
PREFIX OPENCV
URL "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.11/opencv-2.4.11.zip/download"
URL_MD5 32f498451bff1817a60e1aabc2939575
BINARY_DIR ${OPENCV_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_DOCS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_JASPER:BOOL=OFF
-DWITH_JASPER:BOOL=OFF
-DBUILD_JPEG:BOOL=OFF
-DWITH_JPEG:BOOL=OFF
-DWITH_FFMPEG:BOOL=OFF
-DWITH_VFW:BOOL=OFF
-DBUILD_OPENEXR:BOOL=OFF
-DBUILD_PACKAGE:BOOL=ON
-DBUILD_PERF_TESTS:BOOL=OFF
-DBUILD_PNG:BOOL=OFF
-DBUILD_TBB:BOOL=OFF
-DBUILD_TESTS:BOOL=OFF
-DBUILD_TIFF:BOOL=OFF
-DBUILD_ZLIB:BOOL=OFF
-DBUILD_opencv_apps:BOOL=OFF
-DBUILD_opencv_calib3d:BOOL=OFF
-DBUILD_opencv_contrib:BOOL=OFF
-DBUILD_opencv_core:BOOL=ON
-DBUILD_opencv_features2d:BOOL=OFF
-DBUILD_opencv_flann:BOOL=OFF
-DBUILD_opencv_gpu:BOOL=OFF
-DBUILD_opencv_highgui:BOOL=OFF
-DBUILD_opencv_imgproc:BOOL=OFF
-DBUILD_opencv_java:BOOL=OFF
-DBUILD_opencv_legacy:BOOL=OFF
-DBUILD_opencv_ml:BOOL=ON
-DBUILD_opencv_nonfree:BOOL=OFF
-DBUILD_opencv_objdetect:BOOL=OFF
-DBUILD_opencv_ocl:BOOL=OFF
-DBUILD_opencv_photo:BOOL=OFF
-DBUILD_opencv_python:BOOL=OFF
-DBUILD_opencv_stitching:BOOL=OFF
-DBUILD_opencv_superres:BOOL=OFF
-DBUILD_opencv_ts:BOOL=OFF
-DBUILD_opencv_video:BOOL=OFF
-DBUILD_opencv_videostab:BOOL=OFF
-DBUILD_opencv_world:BOOL=OFF
-DWITH_CUDA:BOOL=OFF
-DWITH_OPENCL:BOOL=OFF
${OPENCV_SB_CONFIG}
DEPENDS ${OPENCV_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
ExternalProject_Add(OPENCV
PREFIX OPENCV
URL "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.11/opencv-2.4.11.zip/download"
URL_MD5 32f498451bff1817a60e1aabc2939575
BINARY_DIR ${OPENCV_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_DOCS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_JASPER:BOOL=OFF
-DWITH_JASPER:BOOL=OFF
-DBUILD_JPEG:BOOL=OFF
-DWITH_JPEG:BOOL=OFF
-DWITH_FFMPEG:BOOL=OFF
-DWITH_VFW:BOOL=OFF
-DBUILD_OPENEXR:BOOL=OFF
-DBUILD_PACKAGE:BOOL=ON
-DBUILD_PERF_TESTS:BOOL=OFF
-DBUILD_PNG:BOOL=OFF
-DBUILD_TBB:BOOL=OFF
-DBUILD_TESTS:BOOL=OFF
-DBUILD_TIFF:BOOL=OFF
-DBUILD_ZLIB:BOOL=OFF
-DBUILD_opencv_apps:BOOL=OFF
-DBUILD_opencv_calib3d:BOOL=OFF
-DBUILD_opencv_contrib:BOOL=OFF
-DBUILD_opencv_core:BOOL=ON
-DBUILD_opencv_features2d:BOOL=OFF
-DBUILD_opencv_flann:BOOL=OFF
-DBUILD_opencv_gpu:BOOL=OFF
-DBUILD_opencv_highgui:BOOL=OFF
-DBUILD_opencv_imgproc:BOOL=OFF
-DBUILD_opencv_java:BOOL=OFF
-DBUILD_opencv_legacy:BOOL=OFF
-DBUILD_opencv_ml:BOOL=ON
-DBUILD_opencv_nonfree:BOOL=OFF
-DBUILD_opencv_objdetect:BOOL=OFF
-DBUILD_opencv_ocl:BOOL=OFF
-DBUILD_opencv_photo:BOOL=OFF
-DBUILD_opencv_python:BOOL=OFF
-DBUILD_opencv_stitching:BOOL=OFF
-DBUILD_opencv_superres:BOOL=OFF
-DBUILD_opencv_ts:BOOL=OFF
-DBUILD_opencv_video:BOOL=OFF
-DBUILD_opencv_videostab:BOOL=OFF
-DBUILD_opencv_world:BOOL=OFF
-DWITH_CUDA:BOOL=OFF
-DWITH_OPENCL:BOOL=OFF
${OPENCV_SB_CONFIG}
DEPENDS ${OPENCV_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
SUPERBUILD_PATCH_SOURCE(OPENCV)
SUPERBUILD_PATCH_SOURCE(OPENCV)
set(_SB_OpenCV_DIR ${SB_INSTALL_PREFIX}/share/OpenCV)
set(_SB_OpenCV_DIR ${SB_INSTALL_PREFIX}/share/OpenCV)
INCLUDE_ONCE_MACRO(OPENJPEG)
SETUP_SUPERBUILD(PROJECT OPENJPEG)
SETUP_SUPERBUILD(OPENJPEG)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENJPEG ZLIB TIFF PNG)
......
INCLUDE_ONCE_MACRO(OPENSSL)
SETUP_SUPERBUILD(PROJECT OPENSSL)
SETUP_SUPERBUILD(OPENSSL)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENSSL ZLIB)
......
INCLUDE_ONCE_MACRO(OPENTHREADS)
SETUP_SUPERBUILD(PROJECT OPENTHREADS)
SETUP_SUPERBUILD(OPENTHREADS)
ExternalProject_Add(OPENTHREADS
PREFIX OPENTHREADS
......
INCLUDE_ONCE_MACRO(OSSIM)
SETUP_SUPERBUILD(PROJECT OSSIM)
SETUP_SUPERBUILD(OSSIM)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OSSIM TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)
......
INCLUDE_ONCE_MACRO(OTB)
SETUP_SUPERBUILD(PROJECT OTB)
SETUP_SUPERBUILD(OTB)
set(OTB_SB_SRC ${CMAKE_SOURCE_DIR}/..)
......
INCLUDE_ONCE_MACRO(PCRE)
SETUP_SUPERBUILD(PROJECT PCRE)
SETUP_SUPERBUILD(PCRE)
if(MSVC)
# TODO ?
else()
......@@ -24,5 +24,5 @@ else()
DEPENDEES patch update
DEPENDERS configure
)
endif()
INCLUDE_ONCE_MACRO(PNG)
SETUP_SUPERBUILD(PROJECT PNG)
SETUP_SUPERBUILD(PNG)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(PNG ZLIB)
......
INCLUDE_ONCE_MACRO(PROJ)
SETUP_SUPERBUILD(PROJECT PROJ)
SETUP_SUPERBUILD(PROJ)
if(MSVC)
if(MSVC)
ExternalProject_Add(PROJ_build
PREFIX PROJ
URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
URL_MD5 d815838c92a29179298c126effbb1537
SOURCE_DIR ${PROJ_SB_SRC}
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${PROJ_SB_SRC}/makefile.vc
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/PROJ/CMakeLists.txt
${CMAKE_BINARY_DIR}/PROJ/_install
ExternalProject_Add(PROJ_build
PREFIX PROJ
URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
URL_MD5 d815838c92a29179298c126effbb1537
SOURCE_DIR ${PROJ_SB_SRC}
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${PROJ_SB_SRC}/makefile.vc
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/PROJ/CMakeLists.txt
${CMAKE_BINARY_DIR}/PROJ/_install
)
ExternalProject_Add(PROJ
PREFIX PROJ/_install
DOWNLOAD_COMMAND ""
SOURCE_DIR PROJ/_install
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DPROJ4_BUILD_DIR:STRING=${PROJ_SB_SRC}/src
DEPENDS PROJ_build
CMAKE_COMMAND
ExternalProject_Add(PROJ
PREFIX PROJ/_install
DOWNLOAD_COMMAND ""
SOURCE_DIR PROJ/_install
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DPROJ4_BUILD_DIR:STRING=${PROJ_SB_SRC}/src
DEPENDS PROJ_build
CMAKE_COMMAND
)
else()
ExternalProject_Add(PROJ
PREFIX PROJ
URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
URL_MD5 d815838c92a29179298c126effbb1537
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
# use 'env' because CTest launcher doesn't perform shell interpretation
${SB_ENV_CONFIGURE_CMD}
${PROJ_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
if(APPLE)
SUPERBUILD_PATCH_SOURCE(PROJ)
endif()
else()
ExternalProject_Add(PROJ
PREFIX PROJ
URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
URL_MD5 d815838c92a29179298c126effbb1537
BINARY_DIR ${PROJ_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
# use 'env' because CTest launcher doesn't perform shell interpretation
${SB_ENV_CONFIGURE_CMD}
${PROJ_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
if(APPLE)
SUPERBUILD_PATCH_SOURCE(PROJ)
endif()
set(_SB_PROJ_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/proj_i.lib)
elseif(UNIX)
set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/libproj${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
endif()
set(_SB_PROJ_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/proj_i.lib)
elseif(UNIX)
set(_SB_PROJ_LIBRARY ${SB_INSTALL_PREFIX}/lib/libproj${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
INCLUDE_ONCE_MACRO(QT4)
SETUP_SUPERBUILD(PROJECT QT4)
SETUP_SUPERBUILD(QT4)
#RK: are we ready for QT4 build on linux?.
#This comment here scares me away.
......
INCLUDE_ONCE_MACRO(QWT)
SETUP_SUPERBUILD(PROJECT QWT)
SETUP_SUPERBUILD(QWT)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QWT QT4)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QWT QT4)
set(QWT_SB_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
if(MSVC)
set(QWT_SB_MAKE_PROGRAM "nmake")
endif()
set(QWT_SB_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
if(MSVC)
set(QWT_SB_MAKE_PROGRAM "nmake")
endif()
configure_file(${CMAKE_SOURCE_DIR}/patches/QWT/qwtconfig.pri
${CMAKE_BINARY_DIR}/qwtconfig.pri
@ONLY)
configure_file(${CMAKE_SOURCE_DIR}/patches/QWT/qwtconfig.pri
${CMAKE_BINARY_DIR}/qwtconfig.pri
@ONLY)
if(_SB_QT_QMAKE_EXECUTABLE)
set(QWT_SB_CONFIGURE_PROGRAM ${_SB_QT_QMAKE_EXECUTABLE})
elseif(QT_QMAKE_EXECUTABLE)
set(QWT_SB_CONFIGURE_PROGRAM ${QT_QMAKE_EXECUTABLE})
else()
set(QT_QMAKE_EXECUTABLE "" CACHE FILEPATH "Path to qmake executable")
message(FATAL_ERROR "Please set the qmake executable to use (QT_QMAKE_EXECUTABLE)")
endif()
if(_SB_QT_QMAKE_EXECUTABLE)
set(QWT_SB_CONFIGURE_PROGRAM ${_SB_QT_QMAKE_EXECUTABLE})
elseif(QT_QMAKE_EXECUTABLE)
set(QWT_SB_CONFIGURE_PROGRAM ${QT_QMAKE_EXECUTABLE})
else()
set(QT_QMAKE_EXECUTABLE "" CACHE FILEPATH "Path to qmake executable")
message(FATAL_ERROR "Please set the qmake executable to use (QT_QMAKE_EXECUTABLE)")
endif()
ExternalProject_Add(QWT
PREFIX QWT
URL "http://sourceforge.net/projects/qwt/files/qwt/5.2.3/qwt-5.2.3.zip/download"
URL_MD5 310a1c8ab831f4b2219505dcb7691cf1
SOURCE_DIR ${QWT_SB_SRC}
BINARY_DIR ${QWT_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${QWT_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${QWT_SB_SRC} ${QWT_SB_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/qwtconfig.pri ${QWT_SB_BUILD_DIR}
CONFIGURE_COMMAND ${QWT_SB_CONFIGURE_PROGRAM} ${QWT_SB_BUILD_DIR}/qwt.pro
BUILD_COMMAND ${QWT_SB_MAKE_PROGRAM}
INSTALL_COMMAND ${QWT_SB_MAKE_PROGRAM} install
ExternalProject_Add(QWT
PREFIX QWT
URL "http://sourceforge.net/projects/qwt/files/qwt/5.2.3/qwt-5.2.3.zip/download"
URL_MD5 310a1c8ab831f4b2219505dcb7691cf1
SOURCE_DIR ${QWT_SB_SRC}
BINARY_DIR ${QWT_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${QWT_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${QWT_SB_SRC} ${QWT_SB_BUILD_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/qwtconfig.pri ${QWT_SB_BUILD_DIR}
CONFIGURE_COMMAND ${QWT_SB_CONFIGURE_PROGRAM} ${QWT_SB_BUILD_DIR}/qwt.pro
BUILD_COMMAND ${QWT_SB_MAKE_PROGRAM}
INSTALL_COMMAND ${QWT_SB_MAKE_PROGRAM} install
)
set(_SB_QWT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libqwt.lib)
elseif(UNIX)
set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libqwt${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
set(_SB_QWT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libqwt.lib)
elseif(UNIX)
set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libqwt${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
INCLUDE_ONCE_MACRO(SQLITE)
SETUP_SUPERBUILD(PROJECT SQLITE)
SETUP_SUPERBUILD(SQLITE)
ExternalProject_Add(SQLITE
PREFIX SQLITE
......
INCLUDE_ONCE_MACRO(SWIG)
SETUP_SUPERBUILD(PROJECT SWIG)
SETUP_SUPERBUILD(SWIG)
set(PythonInterp_FIND_VERSION 2.7)
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
set(SWIG_SB_PYTHON_CONFIG "--with-python=${PYTHON_EXECUTABLE}")
else()
set(SWIG_SB_PYTHON_CONFIG)
message(WARNING " No suitable python interpreter was found !")
endif()
set(PythonInterp_FIND_VERSION 2.7)
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
set(SWIG_SB_PYTHON_CONFIG "--with-python=${PYTHON_EXECUTABLE}")
else()
set(SWIG_SB_PYTHON_CONFIG)
message(WARNING " N