Skip to content

Commit

Permalink
Merge pull request #475 from mwoehlke-kitware/superbuild-use-system-p…
Browse files Browse the repository at this point in the history
…ackages

Add options to use system packages to superbuild
  • Loading branch information
mleotta committed May 19, 2021
2 parents a34db3a + 5f687db commit 921bf69
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 20 deletions.
76 changes: 56 additions & 20 deletions CMake/telesculptor-external-fletch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,41 @@ if(NOT WIN32)
set(FLETCH_ADDITIONAL_OPTIONS "-Dfletch_ENABLE_libxml2:BOOL=ON")
endif()

function(use_system_option NAME DESCRIPTION)
option(
TELESCULPTOR_USE_SYSTEM_${NAME}
"Use ${DESCRIPTION} provided by the system (rather than fletch)" OFF
)
mark_as_advanced(TELESCULPTOR_USE_SYSTEM_${NAME})
if(TELESCULPTOR_USE_SYSTEM_${NAME})
set(TELESCULPTOR_ENABLE_FLETCH_${NAME} OFF PARENT_SCOPE)
else()
set(TELESCULPTOR_ENABLE_FLETCH_${NAME} ON PARENT_SCOPE)
endif()
endfunction()

use_system_option(BOOST "Boost")
use_system_option(CERES "ceres-solver")
use_system_option(EIGEN "Eigen")
use_system_option(FFMPEG "FFmpeg")
use_system_option(GDAL "GDAL")
use_system_option(GEOTIFF "GeoTIFF")
use_system_option(JPEG "libjpeg")
use_system_option(OPENCV "OpenCV")
use_system_option(PDAL "PDAL")
use_system_option(PNG "libpng")
use_system_option(PROJ "PROJ")
use_system_option(QT "Qt")
use_system_option(TIFF "libtiff")
use_system_option(VTK "VTK")
use_system_option(ZLIB "zlib")

if(TELESCULPTOR_ENABLE_FLETCH_GDAL OR TELESCULPTOR_ENABLE_FLETCH_PDAL)
set(TELESCULPTOR_ENABLE_FLETCH_GEOS ON)
else()
set(TELESCULPTOR_ENABLE_FLETCH_GEOS OFF)
endif()

ExternalProject_Add(fletch
PREFIX ${TELESCULPTOR_BINARY_DIR}
GIT_REPOSITORY "git://github.com/Kitware/fletch.git"
Expand All @@ -23,56 +58,56 @@ ExternalProject_Add(fletch
-DBUILD_SHARED_LIBS:BOOL=ON
-Dfletch_BUILD_CXX11:BOOL=ON
-Dfletch_BUILD_WITH_PYTHON:BOOL=${TELESCULPTOR_ENABLE_PYTHON}
-Dfletch_ENABLE_Boost:BOOL=ON
-Dfletch_ENABLE_Boost:BOOL=${TELESCULPTOR_ENABLE_FLETCH_BOOST}
-DBoost_SELECT_VERSION:STRING=1.65.1
-Dfletch_ENABLE_Caffe:BOOL=OFF
-Dfletch_ENABLE_Caffe_Segnet:BOOL=OFF
-Dfletch_ENABLE_Ceres:BOOL=ON
-Dfletch_ENABLE_Ceres:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-Dfletch_ENABLE_CppDB:BOOL=OFF
-Dfletch_ENABLE_Darknet:BOOL=OFF
-Dfletch_ENABLE_Darknet_OpenCV:BOOL=OFF
-Dfletch_ENABLE_Eigen:BOOL=ON
-Dfletch_ENABLE_FFmpeg:BOOL=ON
-Dfletch_ENABLE_Eigen:BOOL=${TELESCULPTOR_ENABLE_FLETCH_EIGEN}
-Dfletch_ENABLE_FFmpeg:BOOL=${TELESCULPTOR_ENABLE_FLETCH_FFMPEG}
-DFFmpeg_SELECT_VERSION:STRING=3.3.3
-Dfletch_ENABLE_GDAL:BOOL=ON
-Dfletch_ENABLE_GEOS:BOOL=ON
-Dfletch_ENABLE_GDAL:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GDAL}
-Dfletch_ENABLE_GEOS:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GEOS}
-Dfletch_ENABLE_GFlags:BOOL=OFF
-Dfletch_ENABLE_GLog:BOOL=ON
-Dfletch_ENABLE_GLog:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-Dfletch_ENABLE_GTest:BOOL=${TELESCULPTOR_ENABLE_TESTING}
-Dfletch_ENABLE_GeographicLib:BOOL=OFF
-Dfletch_ENABLE_HDF5:BOOL=OFF
-Dfletch_ENABLE_ITK:BOOL=OFF
-Dfletch_ENABLE_LMDB:BOOL=OFF
-Dfletch_ENABLE_LevelDB:BOOL=OFF
-Dfletch_ENABLE_OpenBLAS:BOOL=OFF
-Dfletch_ENABLE_OpenCV:BOOL=ON
-Dfletch_ENABLE_OpenBLAS:BOOL=OFF
-Dfletch_ENABLE_OpenCV:BOOL=${TELESCULPTOR_ENABLE_FLETCH_OPENCV}
-DOpenCV_SELECT_VERSION:STRING=3.4.0
-Dfletch_ENABLE_OpenCV_FFmpeg:BOOL=ON
-Dfletch_ENABLE_OpenCV_contrib:BOOL=ON
-Dfletch_ENABLE_OpenCV_highgui:BOOL=ON
-Dfletch_ENABLE_PDAL:BOOL=ON
-Dfletch_ENABLE_PNG:BOOL=ON
-Dfletch_ENABLE_PROJ:BOOL=ON
-Dfletch_ENABLE_PDAL:BOOL=${TELESCULPTOR_ENABLE_FLETCH_PDAL}
-Dfletch_ENABLE_PNG:BOOL=${TELESCULPTOR_ENABLE_FLETCH_PNG}
-Dfletch_ENABLE_PROJ:BOOL=${TELESCULPTOR_ENABLE_FLETCH_PROJ}
-Dfletch_ENABLE_PostGIS:BOOL=OFF
-Dfletch_ENABLE_PostgresSQL:BOOL=OFF
-Dfletch_ENABLE_Protobuf:BOOL=OFF
-Dfletch_ENABLE_Qt:BOOL=ON
-Dfletch_ENABLE_Qt:BOOL=${TELESCULPTOR_ENABLE_FLETCH_QT}
-DBUILD_Qt_MINIMAL:BOOL=ON
-DQt_SELECT_VERSION:STRING=5.11.2
-Dfletch_ENABLE_Snappy:BOOL=OFF
-Dfletch_ENABLE_SQLite3:BOOL=ON
-Dfletch_ENABLE_SuiteSparse:BOOL=ON
-Dfletch_ENABLE_SQLite3:BOOL=${TELESCULPTOR_ENABLE_PROJ}
-Dfletch_ENABLE_SuiteSparse:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-Dfletch_ENABLE_TinyXML:BOOL=OFF
-Dfletch_ENABLE_VTK:BOOL=ON
-Dfletch_ENABLE_VTK:BOOL=${TELESCULPTOR_ENABLE_FLETCH_VTK}
-DVTK_SELECT_VERSION:STRING=8.2
-Dfletch_ENABLE_VXL:BOOL=ON
-Dfletch_ENABLE_YAMLcpp:BOOL=OFF
-Dfletch_ENABLE_ZLib:BOOL=ON
-Dfletch_ENABLE_libgeotiff:BOOL=ON
-Dfletch_ENABLE_libjpeg-turbo:BOOL=ON
-Dfletch_ENABLE_ZLib:BOOL=${TELESCULPTOR_ENABLE_FLETCH_ZLIB}
-Dfletch_ENABLE_libgeotiff:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GEOTIFF}
-Dfletch_ENABLE_libjpeg-turbo:BOOL=${TELESCULPTOR_ENABLE_FLETCH_JPEG}
-Dfletch_ENABLE_libjson:BOOL=OFF
-Dfletch_ENABLE_libkml:BOOL=OFF
-Dfletch_ENABLE_libtiff:BOOL=ON
-Dfletch_ENABLE_libtiff:BOOL=${TELESCULPTOR_ENABLE_FLETCH_TIFF}
-Dfletch_ENABLE_log4cplus:BOOL=ON
-Dfletch_ENABLE_openjpeg:BOOL=OFF
-Dfletch_ENABLE_qtExtensions:BOOL=ON
Expand All @@ -95,6 +130,7 @@ ExternalProject_Add(fletch
-DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
${FLETCH_ADDITIONAL_OPTIONS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping install step."
USES_TERMINAL_BUILD 1
)

set(fletch_DIR "${TELESCULPTOR_EXTERNAL_DIR}/fletch-build")
Expand Down
2 changes: 2 additions & 0 deletions CMake/telesculptor-external-kwiver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ExternalProject_Add(kwiver
-DKWIVER_ENABLE_TRACK_ORACLE:BOOL=OFF
-DKWIVER_ENABLE_UUID:BOOL=OFF
-DKWIVER_ENABLE_VISCL:BOOL=OFF
-DKWIVER_ENABLE_VTK:BOOL=ON
-DKWIVER_ENABLE_VXL:BOOL=ON
-DKWIVER_INSTALL_SET_UP_SCRIPT:BOOL=ON
-DKWIVER_TEST_ADD_TARGETS:BOOL=OFF
Expand All @@ -77,6 +78,7 @@ ExternalProject_Add(kwiver
-DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
-DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "Skipping install step."
USES_TERMINAL_BUILD 1
)

set(KWIVER_DIR "${TELESCULPTOR_EXTERNAL_DIR}/kwiver-build")
Expand Down
3 changes: 3 additions & 0 deletions doc/release-notes/master.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ TeleSculptor Application

* Added support for opening .ts (MPEG transport stream) video files.

Build System

* The superbuild now allows using system packages for many dependencies.

Fixes since v1.1.0
------------------
Expand Down

0 comments on commit 921bf69

Please sign in to comment.