diff --git a/Superbuild/CMake/External_boost.cmake b/Superbuild/CMake/External_boost.cmake index 161642350683fe14f8970d53be3502c01af3c8c0..a39a228b5ef276c97a1a667babd0e899bcc7d8e0 100644 --- a/Superbuild/CMake/External_boost.cmake +++ b/Superbuild/CMake/External_boost.cmake @@ -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() diff --git a/Superbuild/CMake/External_curl.cmake b/Superbuild/CMake/External_curl.cmake index cefa225b1cc44a718592e99ccd3a0b2cc9fe5f95..f0d229e9243bbf6831992d3b5c989826e145c030 100644 --- a/Superbuild/CMake/External_curl.cmake +++ b/Superbuild/CMake/External_curl.cmake @@ -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() diff --git a/Superbuild/CMake/External_expat.cmake b/Superbuild/CMake/External_expat.cmake index 03ef143511aefe18f4f553d0bdb8cb368bc44afa..1aa9e2ad1e61445e6db98cd3631ab9f1b17a6f40 100644 --- a/Superbuild/CMake/External_expat.cmake +++ b/Superbuild/CMake/External_expat.cmake @@ -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() diff --git a/Superbuild/CMake/External_fftw.cmake b/Superbuild/CMake/External_fftw.cmake index 7674a1bba36738a71d400c4d626f23f0cce12ce0..213c90b06360eb576d383f199ba0a3319e5f0507 100644 --- a/Superbuild/CMake/External_fftw.cmake +++ b/Superbuild/CMake/External_fftw.cmake @@ -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() diff --git a/Superbuild/CMake/External_gdal.cmake b/Superbuild/CMake/External_gdal.cmake index d67fa48f94d8ae6bc7ac742d09235b03119644bd..7f93c8e17f03bdf441fa90d268565543c676dbef 100644 --- a/Superbuild/CMake/External_gdal.cmake +++ b/Superbuild/CMake/External_gdal.cmake @@ -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() diff --git a/Superbuild/CMake/External_geos.cmake b/Superbuild/CMake/External_geos.cmake index 02dd52942fa457c48c6725a581a5d428d5b69e7b..4b5a2fb0930ff9283f788314bfbd7fa9ee60ee61 100644 --- a/Superbuild/CMake/External_geos.cmake +++ b/Superbuild/CMake/External_geos.cmake @@ -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() diff --git a/Superbuild/CMake/External_geotiff.cmake b/Superbuild/CMake/External_geotiff.cmake index 188ec138cae6d8bdda0daa17dd0653a907b462fe..53be2ed394c8cf6696b083fc18a0c8cd72917fa6 100644 --- a/Superbuild/CMake/External_geotiff.cmake +++ b/Superbuild/CMake/External_geotiff.cmake @@ -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() diff --git a/Superbuild/CMake/External_itk.cmake b/Superbuild/CMake/External_itk.cmake index 6251340e2b1040746845e2484e978b7d42470132..45d1179a5816b864ac351978246b6fb81e4e7347 100644 --- a/Superbuild/CMake/External_itk.cmake +++ b/Superbuild/CMake/External_itk.cmake @@ -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() diff --git a/Superbuild/CMake/External_jpeg.cmake b/Superbuild/CMake/External_jpeg.cmake index 6a99b4041f727438350d0d553bc0b7876dad3015..694096c4df8380701b8bd9b070c1171b4c4968ee 100644 --- a/Superbuild/CMake/External_jpeg.cmake +++ b/Superbuild/CMake/External_jpeg.cmake @@ -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() diff --git a/Superbuild/CMake/External_libkml.cmake b/Superbuild/CMake/External_libkml.cmake index cfc22ba803ca06a2b54d6f970a24fab0482ea767..9b36144a3086d44693a40e4070c9e3e58ac0b080 100644 --- a/Superbuild/CMake/External_libkml.cmake +++ b/Superbuild/CMake/External_libkml.cmake @@ -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() diff --git a/Superbuild/CMake/External_muparser.cmake b/Superbuild/CMake/External_muparser.cmake index 7da72cddd0ff32ec787c4cf1afd7b1868b9f63c6..d4c86b4c33de5892f403194036f805145c0df32e 100644 --- a/Superbuild/CMake/External_muparser.cmake +++ b/Superbuild/CMake/External_muparser.cmake @@ -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() diff --git a/Superbuild/CMake/External_muparserx.cmake b/Superbuild/CMake/External_muparserx.cmake index 29e95fc57036f99d17b08d576cb5e7ae6b6bea87..3332a9b12f4194bff050a4e2f0a0564ab9744637 100644 --- a/Superbuild/CMake/External_muparserx.cmake +++ b/Superbuild/CMake/External_muparserx.cmake @@ -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() diff --git a/Superbuild/CMake/External_opencv.cmake b/Superbuild/CMake/External_opencv.cmake index d6e2a41a59a05d52aa7d9f68c8d4d8b4e8ffa7a1..38b302251aa5fccba0a60b7c73e3968f33ec2b5d 100644 --- a/Superbuild/CMake/External_opencv.cmake +++ b/Superbuild/CMake/External_opencv.cmake @@ -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() diff --git a/Superbuild/CMake/External_openjpeg.cmake b/Superbuild/CMake/External_openjpeg.cmake index 175d74e4664912d6445ca1a2e2b27fe55ce8c1c4..a1ca58683ae3a49ac6203b381d262ae5b8201478 100644 --- a/Superbuild/CMake/External_openjpeg.cmake +++ b/Superbuild/CMake/External_openjpeg.cmake @@ -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() diff --git a/Superbuild/CMake/External_openthreads.cmake b/Superbuild/CMake/External_openthreads.cmake index 232cd63c44a3d09f7c27fde82da983ddad4a1f57..b10e510a04d645a6a3368272b2f6dcbae0d3a438 100644 --- a/Superbuild/CMake/External_openthreads.cmake +++ b/Superbuild/CMake/External_openthreads.cmake @@ -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() diff --git a/Superbuild/CMake/External_ossim.cmake b/Superbuild/CMake/External_ossim.cmake index 12b7f14cee9288fb4b350f2ee89acfcd2554f4cc..994b08c62547529560d436f4979a0858e414a376 100644 --- a/Superbuild/CMake/External_ossim.cmake +++ b/Superbuild/CMake/External_ossim.cmake @@ -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() diff --git a/Superbuild/CMake/External_pcre.cmake b/Superbuild/CMake/External_pcre.cmake index 5e5c073fe9988a3091017e83b08dfed7ed8cd6a3..c98d041afc4776ad6492e257042aeedd6d18e752 100644 --- a/Superbuild/CMake/External_pcre.cmake +++ b/Superbuild/CMake/External_pcre.cmake @@ -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() diff --git a/Superbuild/CMake/External_png.cmake b/Superbuild/CMake/External_png.cmake index 21ac9be819b45eaa2eadea8192db8350ca1131da..2f7ff35655950823823fea422574cacc90ae4360 100644 --- a/Superbuild/CMake/External_png.cmake +++ b/Superbuild/CMake/External_png.cmake @@ -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() diff --git a/Superbuild/CMake/External_proj.cmake b/Superbuild/CMake/External_proj.cmake index 1f034777b198ed47c39b97655ccf057f8d7888f7..338958e3d76fd9cdde0c7aa542f5fd59973f385a 100644 --- a/Superbuild/CMake/External_proj.cmake +++ b/Superbuild/CMake/External_proj.cmake @@ -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() diff --git a/Superbuild/CMake/External_qt4.cmake b/Superbuild/CMake/External_qt4.cmake index 95fa860debfe0b5c9803293039af4ffe5607e050..253d0a7f3bbbcea016ac05a5ab11c8a6508940eb 100644 --- a/Superbuild/CMake/External_qt4.cmake +++ b/Superbuild/CMake/External_qt4.cmake @@ -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() diff --git a/Superbuild/CMake/External_sqlite.cmake b/Superbuild/CMake/External_sqlite.cmake index 918d9dc59ad8f3906595606f6a7720f2c2f4bc08..19f3dfc89084557b6f7ede246822d72018edd58f 100644 --- a/Superbuild/CMake/External_sqlite.cmake +++ b/Superbuild/CMake/External_sqlite.cmake @@ -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() diff --git a/Superbuild/CMake/External_swig.cmake b/Superbuild/CMake/External_swig.cmake index 1bead46270414cb740eed5a7a387d5b82d659911..5020828b2f7e4a5cb437d4056634acd9d2f4afc5 100644 --- a/Superbuild/CMake/External_swig.cmake +++ b/Superbuild/CMake/External_swig.cmake @@ -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() diff --git a/Superbuild/CMake/External_tiff.cmake b/Superbuild/CMake/External_tiff.cmake index 93c8d4384ff06e7d1c4ea59c20bed18206a531bf..ee259d63283571b1a270efdafbb5815218c3ae0c 100644 --- a/Superbuild/CMake/External_tiff.cmake +++ b/Superbuild/CMake/External_tiff.cmake @@ -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() diff --git a/Superbuild/CMake/External_tinyxml.cmake b/Superbuild/CMake/External_tinyxml.cmake index 4b08e40ed1917cf09df22245a1f795656601c312..7e5ac5775e7e1ebc3e4f0a16258b2fe2dd6fad6f 100644 --- a/Superbuild/CMake/External_tinyxml.cmake +++ b/Superbuild/CMake/External_tinyxml.cmake @@ -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()