Commit 93cc4d05 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: superbuild: add empty target when using system libs

parent da5e1f92
......@@ -17,12 +17,12 @@ if(USE_SYSTEM_BOOST)
1.35.0
REQUIRED
)
# Optional components
find_package ( Boost
1.35.0
COMPONENTS unit_test_framework
)
add_custom_target(${proj})
message(STATUS " Using Boost system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,18 +7,18 @@ message(STATUS "Setup cURL ...")
if(USE_SYSTEM_CURL)
find_package ( CURL REQUIRED )
add_custom_target(${proj})
message(STATUS " Using cURL system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
if(USE_SYSTEM_ZLIB)
set(CURL_SB_ZLIB_CONFIG)
else()
set(CURL_SB_ZLIB_CONFIG
-DZLIB_ROOT:STRING=${SB_INSTALL_PREFIX}
)
list(APPEND ${proj}_DEPENDENCIES ZLIB)
endif()
# declare dependencies
set(${proj}_DEPENDENCIES ZLIB)
INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
# set proj back to its original value
set(proj CURL)
ADD_SUPERBUILD_CONFIG_VAR(ZLIB_ROOT)
#TODO: add openssl and other dependencies
if(MSVC)
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup expat ...")
if(USE_SYSTEM_EXPAT)
find_package ( EXPAT REQUIRED )
add_custom_target(${proj})
message(STATUS " Using expat system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,7 +7,8 @@ message(STATUS "Setup FFTW ...")
if(USE_SYSTEM_FFTW)
# TODO : use ITK's FindFFTW
find_package ( FFTW REQUIRED )
#find_package ( FFTW REQUIRED )
add_custom_target(${proj})
message(STATUS " Using FFTW system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup GDAL...")
if(USE_SYSTEM_GDAL)
find_package ( GDAL REQUIRED )
add_custom_target(${proj})
message(STATUS " Using GDAL system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -8,6 +8,7 @@ message(STATUS "Setup GEOS ...")
if(USE_SYSTEM_GEOS)
# TODO : FindGEOS.cmake
#find_package ( GEOS REQUIRED )
add_custom_target(${proj})
message(STATUS " Using GEOS system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup libgeotiff...")
if(USE_SYSTEM_GEOTIFF)
find_package ( GeoTIFF REQUIRED )
add_custom_target(${proj})
message(STATUS " Using libgeotiff system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup ITK...")
if(USE_SYSTEM_ITK)
find_package ( ITK REQUIRED )
add_custom_target(${proj})
message(STATUS " Using ITK system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup libjpeg...")
if(USE_SYSTEM_JPEG)
find_package ( JPEG REQUIRED )
add_custom_target(${proj})
message(STATUS " Using libjpeg system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup libKML ...")
if(USE_SYSTEM_LIBKML)
find_package ( LibKML REQUIRED )
add_custom_target(${proj})
message(STATUS " Using libKML system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup muParser ...")
if(USE_SYSTEM_MUPARSER)
find_package ( MUPARSER REQUIRED )
add_custom_target(${proj})
message(STATUS " Using muParser system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup muParserX ...")
if(USE_SYSTEM_MUPARSERX)
find_package ( MUPARSERX REQUIRED )
add_custom_target(${proj})
message(STATUS " Using muParserX system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup OpenCV...")
if(USE_SYSTEM_OPENCV)
find_package ( OpenCV REQUIRED )
add_custom_target(${proj})
message(STATUS " Using OpenCV system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -8,6 +8,7 @@ message(STATUS "Setup OpenJpeg...")
if(USE_SYSTEM_OPENJPEG)
# TODO : FindOpenJPEG.cmake
# find_package ( OpenJPEG REQUIRED )
add_custom_target(${proj})
message(STATUS " Using OpenJpeg system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -11,6 +11,7 @@ endif()
if(USE_SYSTEM_OPENTHREADS)
find_package ( OpenThreads REQUIRED )
add_custom_target(${proj})
message(STATUS " Using OpenThread system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -15,6 +15,7 @@ ADD_SYSTEM_LOCATION(PROJECT ${proj} VARIABLES ${proj}_LIBRARY ${proj}_INCLUDE_DI
if(USE_SYSTEM_OSSIM)
find_package ( Ossim REQUIRED )
add_custom_target(${proj})
message(STATUS " Using OSSIM system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -8,6 +8,7 @@ message(STATUS "Setup pcre...")
if(USE_SYSTEM_PCRE)
# TODO : FindPCRE.cmake
# find_package ( PCRE REQUIRED )
add_custom_target(${proj})
message(STATUS " Using pcre system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup libpng...")
if(USE_SYSTEM_PNG)
find_package ( PNG REQUIRED )
add_custom_target(${proj})
message(STATUS " Using libpng system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -8,6 +8,7 @@ message(STATUS "Setup Proj.4 ...")
if(USE_SYSTEM_PROJ)
# TODO : FindPROJ.cmake
#find_package ( PROJ REQUIRED )
add_custom_target(${proj})
message(STATUS " Using Proj4 system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup Qt4 ...")
if(USE_SYSTEM_QT4)
find_package ( QT4 REQUIRED )
add_custom_target(${proj})
message(STATUS " Using Qt4 system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -8,6 +8,7 @@ message(STATUS "Setup SQLite...")
if(USE_SYSTEM_SQLITE)
# TODO
#find_package ( SQLite REQUIRED )
add_custom_target(${proj})
message(STATUS " Using SQLite system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup swig...")
if(USE_SYSTEM_SWIG)
find_package ( SWIG REQUIRED )
add_custom_target(${proj})
message(STATUS " Using swig system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -11,6 +11,7 @@ ADD_SYSTEM_PREFIX(PROJECT ${proj})
if(USE_SYSTEM_TIFF)
find_package ( TIFF REQUIRED )
add_custom_target(${proj})
message(STATUS " Using libtiff system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -7,6 +7,7 @@ message(STATUS "Setup TinyXML ...")
if(USE_SYSTEM_TINYXML)
find_package ( TinyXML REQUIRED )
add_custom_target(${proj})
message(STATUS " Using TinyXML system version")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......
......@@ -9,7 +9,9 @@ ADD_SYSTEM_PREFIX(PROJECT ${proj} CMAKE_ALIAS ZLIB_ROOT)
if(USE_SYSTEM_ZLIB)
find_package(ZLIB REQUIRED)
message(STATUS " Using Zlib system version")
add_custom_target(${proj})
set(ZLIB_ROOT ${ZLIB_INCLUDE_DIR}/..)
message(STATUS " Using Zlib system version : ${ZLIB_ROOT}")
else()
SETUP_SUPERBUILD(PROJECT ${proj})
......@@ -42,6 +44,7 @@ else()
endif()
set(ZLIB_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
set(ZLIB_ROOT ${SB_INSTALL_PREFIX})
if(MSVC)
set(ZLIB_LIBRARY ${SB_INSTALL_PREFIX}/lib/zdll.lib)
elseif(APPLE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment