Commit 73b37db9 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: superbuild: add include guards

parent be19f381
......@@ -2,6 +2,9 @@ message(STATUS "Setup Boost ...")
set(proj BOOST)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_BOOST ON)
option(USE_SYSTEM_BOOST " Use a system build of Boost." ${DEFAULT_USE_SYSTEM_BOOST})
......@@ -120,3 +123,4 @@ else()
endif() #end else MSVC
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup cURL ...")
set(proj CURL)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_CURL ON)
option(USE_SYSTEM_CURL " Use a system build of cURL." ${DEFAULT_USE_SYSTEM_CURL})
......@@ -57,3 +60,4 @@ else()
message(STATUS " Using cURL SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup expat ...")
set(proj EXPAT)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_EXPAT OFF)
option(USE_SYSTEM_EXPAT " Use a system build of expat." ${DEFAULT_USE_SYSTEM_EXPAT})
......@@ -31,3 +34,4 @@ else()
message(STATUS " Using Expat SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup FFTW ...")
set(proj FFTW)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_FFTW OFF)
option(USE_SYSTEM_FFTW " Use a system build of FFTW." ${DEFAULT_USE_SYSTEM_FFTW})
......@@ -74,4 +77,5 @@ else()
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup GDAL...")
set(proj GDAL)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_GDAL OFF)
option(USE_SYSTEM_GDAL " Use a system build of GDAL." ${DEFAULT_USE_SYSTEM_GDAL})
......@@ -151,3 +154,4 @@ else()
message(STATUS " Using GDAL SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup GEOS ...")
set(proj GEOS)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_GEOS OFF)
option(USE_SYSTEM_GEOS " Use a system build of GEOS." ${DEFAULT_USE_SYSTEM_GEOS})
......@@ -31,3 +34,4 @@ else()
message(STATUS " Using GEOS SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup libgeotiff...")
set(proj GEOTIFF)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_GEOTIFF OFF)
option(USE_SYSTEM_GEOTIFF " Use a system build of libgeotiff." ${DEFAULT_USE_SYSTEM_GEOTIFF})
......@@ -141,3 +144,4 @@ else()
message(STATUS " Using GeoTIFF SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup ITK...")
set(proj ITK)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
# Use an external version of ITK by default except on windows (ITK is not packaged in OSGeo4W)
set(DEFAULT_USE_SYSTEM_ITK OFF)
......@@ -194,3 +197,4 @@ else()
message(STATUS " Using ITK SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup libjpeg...")
set(proj JPEG)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_JPEG OFF)
option(USE_SYSTEM_JPEG " Use a system build of libjpeg." ${DEFAULT_USE_SYSTEM_JPEG})
......@@ -64,3 +67,4 @@ else()
message(STATUS " Using libjpeg SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup libKML ...")
set(proj LIBKML)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_LIBKML OFF)
option(USE_SYSTEM_LIBKML " Use a system build of libKML." ${DEFAULT_USE_SYSTEM_LIBKML})
......@@ -59,3 +62,4 @@ else()
message(STATUS " Using libKML SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup muParser ...")
set(proj MUPARSER)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_MUPARSER OFF)
option(USE_SYSTEM_MUPARSER " Use a system build of muParser." ${DEFAULT_USE_SYSTEM_MUPARSER})
......@@ -31,3 +34,4 @@ else()
message(STATUS " Using muParser SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup muParserX ...")
set(proj MUPARSERX)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_MUPARSERX OFF)
option(USE_SYSTEM_MUPARSERX " Use a system build of muParserX." ${DEFAULT_USE_SYSTEM_MUPARSERX})
......@@ -42,3 +45,4 @@ else()
message(STATUS " Using muParserX SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup OpenCV...")
set(proj OPENCV)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_OPENCV OFF)
option(USE_SYSTEM_OPENCV "Use a system build of OpenCV." ${DEFAULT_USE_SYSTEM_OPENCV})
......@@ -73,3 +76,4 @@ else()
message(STATUS " Using OpenCV SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup OpenJpeg...")
set(proj OPENJPEG)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_OPENJPEG OFF)
option(USE_SYSTEM_OPENJPEG " Use a system build of OpenJpeg." ${DEFAULT_USE_SYSTEM_OPENJPEG})
......@@ -58,3 +61,4 @@ else()
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup OpenThreads ...")
set(proj OPENTHREADS)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_OPENTHREADS OFF)
option(USE_SYSTEM_OPENTHREADS " Use a system build of OpenThread." ${DEFAULT_USE_SYSTEM_OPENTHREADS})
......@@ -56,3 +59,4 @@ else()
message(STATUS " Using OpenThreads SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup Ossim...")
set(proj OSSIM)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_OSSIM OFF)
# OSGeo4W provides an "ossim" package : use it otherwise if it is installed and not used by OTB
......@@ -96,3 +99,4 @@ else()
message(STATUS " Using OSSIM SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup pcre...")
set(proj PCRE)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_PCRE ON)
option(USE_SYSTEM_PCRE " Use a system build of pcre." ${DEFAULT_USE_SYSTEM_PCRE})
......@@ -40,3 +43,4 @@ else()
message(STATUS " Using pcre SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup libpng...")
set(proj PNG)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_PNG ON)
option(USE_SYSTEM_PNG " Use a system build of libtiff." ${DEFAULT_USE_SYSTEM_PNG})
......@@ -60,3 +63,4 @@ else()
message(STATUS " Using libpng SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup Proj.4 ...")
set(proj PROJ)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_PROJ OFF)
option(USE_SYSTEM_PROJ " Use a system build of Proj.4." ${DEFAULT_USE_SYSTEM_PROJ})
......@@ -74,3 +77,4 @@ else()
message(STATUS " Using Proj4 SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup Qt4 ...")
set(proj QT4)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_QT4 ON)
option(USE_SYSTEM_QT4 " Use a system build of Qt4." ${DEFAULT_USE_SYSTEM_QT4})
......@@ -62,3 +65,4 @@ else()
message(STATUS " Using Qt4 SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup SQLite...")
set(proj SQLITE)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_SQLITE OFF)
option(USE_SYSTEM_SQLITE " Use a system build of SQLite." ${DEFAULT_USE_SYSTEM_SQLITE})
......@@ -55,3 +58,4 @@ else()
message(STATUS " Using SQLite SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup swig...")
set(proj SWIG)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_SWIG ON)
option(USE_SYSTEM_SWIG " Use a system build of swig." ${DEFAULT_USE_SYSTEM_SWIG})
......@@ -85,3 +88,4 @@ else()
message(STATUS " Using swig SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup libtiff...")
set(proj TIFF)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_TIFF OFF)
SETUP_SYSTEM_LIBRARY(PROJECT ${proj} DOC " Use a system build of libtiff.")
......@@ -95,3 +98,4 @@ else()
message(STATUS " Using libtiff SuperBuild version")
endif()
endif()
......@@ -2,6 +2,9 @@ message(STATUS "Setup TinyXML ...")
set(proj TINYXML)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
set(DEFAULT_USE_SYSTEM_TINYXML OFF)
option(USE_SYSTEM_TINYXML " Use a system build of TinyXML." ${DEFAULT_USE_SYSTEM_TINYXML})
......@@ -30,3 +33,4 @@ else()
message(STATUS " Using TinyXML SuperBuild version")
endif()
endif()
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