Commit be19f381 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: superbuild: use a specific variable for install prefix

parent aac740aa
......@@ -22,9 +22,9 @@ else()
URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
BINARY_DIR ${BOOST_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
......@@ -37,10 +37,10 @@ else()
URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
BINARY_DIR ${BOOST_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${BOOST_SB_BUILD_DIR}/bootstrap.sh
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
BUILD_COMMAND ./b2
INSTALL_COMMAND ./b2 install
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory
......@@ -88,7 +88,7 @@ else()
SOURCE_DIR ${BOOST_SB_SRC}/include/boost
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_SB_SRC}/include/ ${CMAKE_INSTALL_PREFIX}/include/
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_SB_SRC}/include/ ${SB_INSTALL_PREFIX}/include/
)
set(BOOSTLIBS)
foreach(BOOSTLIB "REGEX" "GRAPH" "UTF")
......@@ -100,7 +100,7 @@ else()
DEPENDS ${proj}_HEADERS
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_SB_SRC}/lib ${CMAKE_INSTALL_PREFIX}/lib
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_SB_SRC}/lib ${SB_INSTALL_PREFIX}/lib
)
list(APPEND BOOSTLIBS ${proj}_${BOOSTLIB})
endforeach()
......
......@@ -16,7 +16,7 @@ else()
set(CURL_SB_ZLIB_CONFIG)
else()
set(CURL_SB_ZLIB_CONFIG
-DZLIB_ROOT:STRING=${CMAKE_INSTALL_PREFIX}
-DZLIB_ROOT:STRING=${SB_INSTALL_PREFIX}
)
list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
......@@ -29,12 +29,12 @@ else()
URL_MD5 58943642ea0ed050ab0431ea1caf3a6f
SOURCE_DIR ${CURL_SB_SRC}
BINARY_DIR ${CURL_SB_BUILD_DIR}/winbuild
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CURL_SB_SRC} ${CURL_SB_BUILD_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${CURL_SB_BUILD_DIR}/winbuild/Makefile.vc mode=dll WITH_ZLIB=dll WITH_DEVEL=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${CURL_SB_BUILD_DIR}/builds/ ${CMAKE_COMMAND} -E copy_directory libcurl-vc-x86-release-dll-zlib-dll-ipv6-sspi-winssl ${CMAKE_INSTALL_PREFIX}
BUILD_COMMAND nmake /f ${CURL_SB_BUILD_DIR}/winbuild/Makefile.vc mode=dll WITH_ZLIB=dll WITH_DEVEL=${SB_INSTALL_PREFIX}
INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${CURL_SB_BUILD_DIR}/builds/ ${CMAKE_COMMAND} -E copy_directory libcurl-vc-x86-release-dll-zlib-dll-ipv6-sspi-winssl ${SB_INSTALL_PREFIX}
)
else(UNIX)
......@@ -43,9 +43,9 @@ else()
URL "http://curl.haxx.se/download/curl-7.40.0.tar.gz"
URL_MD5 58943642ea0ed050ab0431ea1caf3a6f
BINARY_DIR ${CURL_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_CURL_EXE:BOOL=ON
......
......@@ -17,9 +17,9 @@ else()
URL "http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download"
URL_MD5 dd7dab7a5fea97d2a6a43f511449b7cd
BINARY_DIR ${EXPAT_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_examples:BOOL=OFF
......
......@@ -26,10 +26,10 @@ else()
PREFIX ${proj}
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${FFTW_SB_BUILD_FLOAT_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
--enable-float
......@@ -50,10 +50,10 @@ else()
PREFIX ${proj}
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${FFTW_SB_BUILD_DOUBLE_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
--disable-float
......
......@@ -17,21 +17,21 @@ else()
list(APPEND GDAL_SB_CONFIG --with-libtiff=${SYSTEM_TIFF_PREFIX})
endif()
else()
list(APPEND GDAL_SB_CONFIG --with-libtiff=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-libtiff=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES TIFF)
endif()
if(USE_SYSTEM_GEOTIFF)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-geotiff=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-geotiff=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES GEOTIFF)
endif()
if(USE_SYSTEM_PNG)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-png=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-png=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES PNG)
endif()
......@@ -39,28 +39,28 @@ else()
if(USE_SYSTEM_JPEG)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-jpeg=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-jpeg=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES JPEG)
endif()
if(USE_SYSTEM_OPENJPEG)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-openjpeg=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-openjpeg=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES OPENJPEG)
endif()
if(USE_SYSTEM_SQLITE)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-sqlite3=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-sqlite3=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES SQLITE)
endif()
if(USE_SYSTEM_GEOS)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-geos=${CMAKE_INSTALL_PREFIX}/bin/geos-config)
list(APPEND GDAL_SB_CONFIG --with-geos=${SB_INSTALL_PREFIX}/bin/geos-config)
list(APPEND ${proj}_DEPENDENCIES GEOS)
endif()
......@@ -68,28 +68,28 @@ else()
# TODO : handle specific prefix
else()
# Not shure this setting works with zlib
list(APPEND GDAL_SB_CONFIG --with-libz=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-libz=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
if(USE_SYSTEM_EXPAT)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-expat=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-expat=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES EXPAT)
endif()
if(USE_SYSTEM_LIBKML)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-libkml=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-libkml=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES LIBKML)
endif()
if(USE_SYSTEM_CURL)
# TODO : handle specific prefix
else()
list(APPEND GDAL_SB_CONFIG --with-curl=${CMAKE_INSTALL_PREFIX})
list(APPEND GDAL_SB_CONFIG --with-curl=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES CURL)
endif()
......@@ -102,15 +102,15 @@ else()
URL "http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz"
URL_MD5 9fdf0f2371a3e9863d83e69951c71ec4
BINARY_DIR ${GDAL_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
UPDATE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
CONFIGURE_COMMAND
# use 'env' because CTest launcher doesn't perform shell interpretation
env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib
env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib
${GDAL_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
--without-ogdi
--without-jasper
......@@ -126,7 +126,7 @@ else()
##is needed for SQLITE driver
list(REMOVE_ITEM ${proj}_DEPENDENCIES LIBKML)
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
configure_file(${CMAKE_SOURCE_DIR}/patches/${proj}/nmake_gdal_extra.opt.in ${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt)
......@@ -136,7 +136,7 @@ else()
URL_MD5 9fdf0f2371a3e9863d83e69951c71ec4
SOURCE_DIR ${GDAL_SB_SRC}
BINARY_DIR ${GDAL_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/ogrsqlitevirtualogr.cpp
......
......@@ -18,9 +18,9 @@ else()
URL_MD5 fc5df2d926eb7e67f988a43a92683bae
SOURCE_DIR ${GEOS_SB_SRC}
BINARY_DIR ${GEOS_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
......
......@@ -24,11 +24,11 @@ else()
else()
if(MSVC)
list(APPEND GEOTIFF_SB_CONFIG
-DTIFF_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DTIFF_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libtiff_i.lib
-DTIFF_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DTIFF_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/libtiff_i.lib
)
else()
list(APPEND GEOTIFF_SB_CONFIG --with-libtiff=${CMAKE_INSTALL_PREFIX})
list(APPEND GEOTIFF_SB_CONFIG --with-libtiff=${SB_INSTALL_PREFIX})
endif()
list(APPEND ${proj}_DEPENDENCIES TIFF)
......@@ -37,11 +37,11 @@ else()
if(USE_SYSTEM_PROJ)
set(GEOTIFF_SB_PROJ_CONFIG)
else()
set(GEOTIFF_SB_PROJ_CONFIG --with-proj=${CMAKE_INSTALL_PREFIX})
set(GEOTIFF_SB_PROJ_CONFIG --with-proj=${SB_INSTALL_PREFIX})
if(MSVC)
set(GEOTIFF_SB_PROJ_CONFIG
-DPROJ4_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DPROJ4_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/proj_i.lib
-DPROJ4_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DPROJ4_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/proj_i.lib
)
endif()
list(APPEND ${proj}_DEPENDENCIES PROJ)
......@@ -55,23 +55,23 @@ else()
set(GEOTIFF_SB_ZLIB_CONFIG)
if(MSVC)
set(GEOTIFF_SB_ZLIB_CONFIG
-DZLIB_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/zlib.lib
-DZLIB_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/zlib.lib
)
list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
#set(GEOTIFF_SB_ZLIB_CONFIG --with-zlib=${CMAKE_INSTALL_PREFIX})
#set(GEOTIFF_SB_ZLIB_CONFIG --with-zlib=${SB_INSTALL_PREFIX})
#list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
if(USE_SYSTEM_JPEG)
set(GEOTIFF_SB_JPEG_CONFIG)
else()
set(GEOTIFF_SB_JPEG_CONFIG --with-jpeg=${CMAKE_INSTALL_PREFIX})
set(GEOTIFF_SB_JPEG_CONFIG --with-jpeg=${SB_INSTALL_PREFIX})
if(MSVC)
set(GEOTIFF_SB_JPEG_CONFIG
-DJPEG_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DJPEG_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libjpeg.lib
-DJPEG_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DJPEG_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/libjpeg.lib
)
list(APPEND ${proj}_DEPENDENCIES JPEG)
endif()
......@@ -84,14 +84,14 @@ else()
URL "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.0.tar.gz"
URL_MD5 efa7b418bc00228fcda4da63557e40c2
BINARY_DIR ${GEOTIFF_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt
${GEOTIFF_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DWITH_TIFF:BOOL=ON
-DWITH_PROJ4:BOOL=ON
......@@ -110,12 +110,12 @@ else()
URL "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.0.tar.gz"
URL_MD5 efa7b418bc00228fcda4da63557e40c2
BINARY_DIR ${GEOTIFF_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
# use 'env' because CTest launcher doesn't perform shell interpretation
env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib
env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib
${GEOTIFF_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
${GEOTIFF_SB_JPEG_CONFIG}
${GEOTIFF_SB_CONFIG}
......
......@@ -121,7 +121,7 @@ else()
)
if (NOT USE_SYSTEM_FFTW)
set(ITK_SB_FFTW_CONFIG ${ITK_SB_FFTW_CONFIG}
-DFFTW_INCLUDE_PATH:PATH=${CMAKE_INSTALL_PREFIX}/include
-DFFTW_INCLUDE_PATH:PATH=${SB_INSTALL_PREFIX}/include
)
list(APPEND ${proj}_DEPENDENCIES FFTWF)
list(APPEND ${proj}_DEPENDENCIES FFTWD)
......@@ -164,9 +164,9 @@ else()
URL_MD5 2c84eae50ab2452cdad32aaadced3c37
SOURCE_DIR ${ITK_SB_SRC}
BINARY_DIR ${ITK_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF
${ITK_MODULES_CMAKE_CACHE}
......@@ -174,7 +174,7 @@ else()
-DBUILD_SHARED_LIBS:BOOL=${SB_BUILD_SHARED_LIBS}
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DITK_USE_SYSTEM_EXPAT:BOOL=ON
-DITK_USE_SYSTEM_ZLIB:BOOL=ON
-DITK_USE_SYSTEM_TIFF:BOOL=ON
......
......@@ -20,10 +20,10 @@ else()
URL_MD5 2af71a567af8f60a649b2fcc87c88192
SOURCE_DIR ${JPEG_SB_SRC}
BINARY_DIR ${JPEG_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt ${JPEG_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
)
......@@ -43,10 +43,10 @@ else()
URL "http://www.ijg.org/files/jpegsrc.v9a.tar.gz"
URL_MD5 3353992aecaee1805ef4109aadd433e7
BINARY_DIR ${JPEG_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${JPEG_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-shared=yes
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
......
......@@ -16,13 +16,13 @@ else()
set(LIBKML_SB_EXPAT_CONFIG)
else()
set(LIBKML_SB_EXPAT_CONFIG
-DEXPAT_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DEXPAT_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libexpat${CMAKE_SHARED_LIBRARY_SUFFIX}
-DEXPAT_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DEXPAT_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/libexpat${CMAKE_SHARED_LIBRARY_SUFFIX}
)
if(MSVC)
set(LIBKML_SB_EXPAT_CONFIG
-DEXPAT_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-DEXPAT_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/expat.lib
-DEXPAT_INCLUDE_DIR:STRING=${SB_INSTALL_PREFIX}/include
-DEXPAT_LIBRARY:STRING=${SB_INSTALL_PREFIX}/lib/expat.lib
)
endif()
list(APPEND ${proj}_DEPENDENCIES EXPAT)
......@@ -45,14 +45,14 @@ else()
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 ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/${proj} ${LIBKML_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${LIBKML_SB_EXPAT_CONFIG}
)
......
......@@ -17,9 +17,9 @@ else()
URL "http://downloads.sourceforge.net/project/muparser/muparser/Version%202.2.3/muparser_v2_2_3.zip"
URL_MD5 9de40ec1dab5bd2787ee344fce5846ad
BINARY_DIR ${MUPARSER_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
DEPENDS ${${proj}_DEPENDENCIES}
......
......@@ -26,9 +26,9 @@ else()
SVN_REPOSITORY "http://muparserx.googlecode.com/svn/trunk"
SVN_REVISION -r 291
BINARY_DIR ${MUPARSERX_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
${MUPARSERX_FLAGS}
......
......@@ -23,11 +23,11 @@ else()
URL "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.10/opencv-2.4.10.zip/download"
URL_MD5 ec63952d3a3dff965d5fdde765926821
BINARY_DIR ${OPENCV_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_DOCS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
......
......@@ -35,9 +35,9 @@ else()
URL "http://sourceforge.net/projects/openjpeg.mirror/files/2.0.0/openjpeg-2.0.0.tar.gz/download"
URL_MD5 d9be274bddc0f47f268e484bdcaaa6c5
BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_CODEC:BOOL=ON
-DBUILD_DOC:BOOL=OFF
......@@ -48,7 +48,7 @@ else()
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
-DBUILD_THIRDPARTY:BOOL=OFF
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${OPENJPEG_SB_CONFIG}
DEPENDS ${${proj}_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
......
......@@ -24,9 +24,9 @@ else()
SVN_REVISION -r 14667
SOURCE_DIR ${OPENTHREADS_SB_SRC}
BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
......@@ -40,9 +40,9 @@ else()
URL_MD5 4980f8692712a24d4c99f363f80c6814
SOURCE_DIR ${OPENTHREADS_SB_SRC}
BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
......
......@@ -71,16 +71,16 @@ else()
SVN_REPOSITORY "http://svn.osgeo.org/ossim/trunk/ossim/"
SVN_REVISION -r 23092
BINARY_DIR ${OSSIM_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DOSSIM_VERSION:STRING=1.8.18-1
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
-DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
-DBUILD_OSSIM_APPS:BOOL=OFF
-DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${OSSIM_SB_CONFIG}
DEPENDS ${${proj}_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
......
......@@ -20,10 +20,10 @@ else()
URL "http://sourceforge.net/projects/pcre/files/pcre/8.36/pcre-8.36.tar.gz/download"
URL_MD5 ff7b4bb14e355f04885cf18ff4125c98
BINARY_DIR ${PCRE_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${PCRE_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
DEPENDS ${${proj}_DEPENDENCIES}
......
......@@ -17,12 +17,12 @@ else()
else()
if(MSVC)
set(PNG_SB_ZLIB_CONFIG
-DZLIB_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/zlib.lib)
-DZLIB_INCLUDE_DIR:PATH=${SB_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:FILEPATH=${SB_INSTALL_PREFIX}/lib/zlib.lib)
else(UNIX)
set(PNG_SB_ZLIB_CONFIG
-DZLIB_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/libz${CMAKE_SHARED_LIBRARY_SUFFIX})
-DZLIB_INCLUDE_DIR:PATH=${SB_INSTALL_PREFIX}/include
-DZLIB_LIBRARY:FILEPATH=${SB_INSTALL_PREFIX}/lib/libz${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
......@@ -32,11 +32,11 @@ else()
URL "http://sourceforge.net/projects/libpng/files/libpng16/1.6.16/lpng1616.zip/download"
URL_MD5 c90c9587c9a5c735327fb3f6900f6b03
BINARY_DIR ${PNG_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DEPENDS ${${proj}_DEPENDENCIES}
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_PREFIX}
-DSKIP_INSTALL_EXECUTABLES:BOOL=OFF
-DPNG_STATIC:BOOL=OFF
-DPNG_SHARED:BOOL=ON
......@@ -53,7 +53,7 @@ else()
if(MSVC)
ExternalProject_Add_Step(${proj} duplicate_pnglib
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_INSTALL_PREFIX}/lib/libpng16.lib ${CMAKE_INSTALL_PREFIX}/lib/libpng.lib
${SB_INSTALL_PREFIX}/lib/libpng16.lib ${SB_INSTALL_PREFIX}/lib/libpng.lib
DEPENDEES install
)
endif()
......
......@@ -20,7 +20,7 @@ else()
URL_MD5 d815838c92a29179298c126effbb1537
SOURCE_DIR ${PROJ_SB_SRC}
BINARY_DIR ${PROJ_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${PROJ_SB_SRC}/makefile.vc
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt
......@@ -32,9 +32,9 @@ else()
DOWNLOAD_COMMAND ""
SOURCE_DIR ${proj}/_install
BINARY_DIR ${PROJ_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DPROJ4_BUILD_DIR:STRING=${PROJ_SB_BUILD_DIR}/src
DEPENDS ${proj}_build
......@@ -53,12 +53,12 @@ else()
URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
URL_MD5 d815838c92a29179298c126effbb1537
BINARY_DIR ${PROJ_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
# use 'env' because CTest launcher doesn't perform shell interpretation
env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib
env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib
${PROJ_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
......
......@@ -38,7 +38,7 @@ else()
#use system libs always for Qt4 as we build them from source or have already in system
set(QT4_SB_CONFIG)
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
ExternalProject_Add(${proj}
......@@ -46,7 +46,7 @@ else()
URL "http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz"
URL_MD5 2edbe4d6c2eff33ef91732602f3518eb
BINARY_DIR ${QT4_SB_SRC}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${QT4_SB_SRC} configure -prefix ${CMAKE_WIN_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite
DEPENDS ${${proj}_DEPENDENCIES}
)
......
......@@ -18,9 +18,9 @@ else()
URL "https://sqlite.org/2014/sqlite-autoconf-3080702.tar.gz"
URL_MD5 0f847048745ddbdf0c441c82d096fbb4
BINARY_DIR ${SQLITE_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND ${SQLITE_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
--enable-static=no
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
......@@ -40,11 +40,11 @@ else()
URL_MD5 b1cbcbd710bdfd762dc169f1676053b5
SOURCE_DIR ${SQLITE_SB_SRC}
BINARY_DIR ${SQLITE_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt ${SQLITE_SB_SRC}
UPDATE_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/sqlite3_win.c ${SQLITE_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
CMAKE_COMMAND
......
......@@ -35,7 +35,7 @@ else()
PREFIX ${proj}
URL "http://sourceforge.net/projects/swig/files/swigwin/swigwin-3.0.5/swigwin-3.0.5.zip/download"
URL_MD5 fd2e050f29e2a00b2348f5f7d3476490
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
......@@ -46,14 +46,14 @@ else()
if(USE_SYSTEM_PCRE)
# TODO : handle specific location
else()
list(APPEND SWIG_SB_CONFIG --with-pcre-prefix=${CMAKE_INSTALL_PREFIX})
list(APPEND SWIG_SB_CONFIG --with-pcre-prefix=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES PCRE)
endif()
if(USE_SYSTEM_BOOST)
# TODO : handle specific location
else()
list(APPEND SWIG_SB_CONFIG --with-boost=${CMAKE_INSTALL_PREFIX})
list(APPEND SWIG_SB_CONFIG --with-boost=${SB_INSTALL_PREFIX})
list(APPEND ${proj}_DEPENDENCIES BOOST)
endif()
......@@ -62,10 +62,10 @@ else()
URL "http://sourceforge.net/projects/swig/files/swig/swig-3.0.5/swig-3.0.5.tar.gz/download"
URL_MD5 dcb9638324461b9baba8e044fe59031d
BINARY_DIR ${SWIG_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
INSTALL_DIR ${SB_INSTALL_PREFIX}
CONFIGURE_COMMAND
${SWIG_SB_BUILD_DIR}/configure
--prefix=${CMAKE_INSTALL_PREFIX}
--prefix=${SB_INSTALL_PREFIX}
${SWIG_SB_PYTHON_CONFIG}
${SWIG_SB_JAVA_CONFIG}
${SWIG_SB_CONFIG}
......