-
Notifications
You must be signed in to change notification settings - Fork 150
/
telesculptor-external-fletch.cmake
executable file
·137 lines (128 loc) · 5.39 KB
/
telesculptor-external-fletch.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# fletch External Project
#
set(KWIVER_DEPENDENCIES)
message(STATUS "Configuring external fletch")
list(APPEND KWIVER_DEPENDENCIES fletch)
list(APPEND TELESCULPTOR_DEPENDENCIES fletch)
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 "https://github.com/Kitware/fletch.git"
GIT_TAG 94870a290a06db845e80816863bb6d1b9cb12085
#GIT_SHALLOW 1
SOURCE_DIR ${TELESCULPTOR_EXTERNAL_DIR}/fletch
BINARY_DIR ${TELESCULPTOR_EXTERNAL_DIR}/fletch-build
STAMP_DIR ${TELESCULPTOR_STAMP_DIR}
CMAKE_CACHE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
-Dfletch_BUILD_CXX11:BOOL=ON
-Dfletch_BUILD_WITH_PYTHON:BOOL=${TELESCULPTOR_ENABLE_PYTHON}
-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=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-Dfletch_ENABLE_CppDB:BOOL=OFF
-Dfletch_ENABLE_Darknet:BOOL=OFF
-Dfletch_ENABLE_Darknet_OpenCV:BOOL=OFF
-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=${TELESCULPTOR_ENABLE_FLETCH_GDAL}
-Dfletch_ENABLE_GEOS:BOOL=${TELESCULPTOR_ENABLE_FLETCH_GEOS}
-Dfletch_ENABLE_GFlags:BOOL=OFF
-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=${TELESCULPTOR_ENABLE_FLETCH_OPENCV}
-DOpenCV_SELECT_VERSION:STRING=4.5.1
-Dfletch_ENABLE_OpenCV_FFmpeg:BOOL=ON
-Dfletch_ENABLE_OpenCV_contrib:BOOL=ON
-Dfletch_ENABLE_OpenCV_highgui: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=${TELESCULPTOR_ENABLE_FLETCH_QT}
-DBUILD_Qt_MINIMAL:BOOL=ON
-DQt_SELECT_VERSION:STRING=5.12.8
-Dfletch_ENABLE_Snappy:BOOL=OFF
-Dfletch_ENABLE_SQLite3:BOOL=${TELESCULPTOR_ENABLE_FLETCH_PROJ}
-Dfletch_ENABLE_SuiteSparse:BOOL=${TELESCULPTOR_ENABLE_FLETCH_CERES}
-Dfletch_ENABLE_TinyXML:BOOL=OFF
-Dfletch_ENABLE_VTK:BOOL=${TELESCULPTOR_ENABLE_FLETCH_VTK}
-DVTK_SELECT_VERSION:STRING=9.0
-Dfletch_ENABLE_VXL:BOOL=ON
-Dfletch_ENABLE_YAMLcpp:BOOL=OFF
-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=${TELESCULPTOR_ENABLE_FLETCH_TIFF}
-Dfletch_ENABLE_log4cplus:BOOL=ON
-Dfletch_ENABLE_openjpeg:BOOL=OFF
-Dfletch_ENABLE_qtExtensions:BOOL=ON
-Dfletch_ENABLE_pybind11:BOOL=${TELESCULPTOR_ENABLE_PYTHON}
-Dfletch_ENABLE_shapelib:BOOL=OFF
-Dfletch_BUILD_WITH_CUDA:BOOL=${TELESCULPTOR_ENABLE_CUDA}
-DCUDA_TOOLKIT_ROOT_DIR:PATH=${CUDA_TOOLKIT_ROOT_DIR}
-Dfletch_PYTHON_MAJOR_VERSION:STRING=3
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_CONFIGURATION_TYPES:STRING=${CMAKE_CONFIGURATION_TYPES}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
${CMAKE_CXX_COMPILER_LAUNCHER_FLAG}
${CMAKE_C_COMPILER_LAUNCHER_FLAG}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
-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")