-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
196 lines (181 loc) · 5.33 KB
/
CMakeLists.txt
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
cmake_minimum_required(VERSION 3.0)
project(nodecolmap)
include(ExternalProject)
ExternalProject_Add(ceres
URL http://ceres-solver.org/ceres-solver-1.14.0.tar.gz
UPDATE_COMMAND ""
CMAKE_ARGS
-DCMAKE_C_FLAGS=-fPIC
-DCMAKE_CXX_FLAGS=-fPIC
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
)
ExternalProject_Add(colmap
DEPENDS ceres
GIT_REPOSITORY https://github.com/colmap/colmap/
GIT_TAG f2ce5f58e1593ceef8912b55c30a049bd4d24b33
UPDATE_COMMAND ""
CMAKE_ARGS -DCGAL_ENABLED=OFF
-DCUDA_ENABLED=ON
)
ExternalProject_Add(dem2mesh
GIT_REPOSITORY https://github.com/OpenDroneMap/dem2mesh.git
GIT_TAG master
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND make -j$(nproc)
INSTALL_COMMAND cp <SOURCE_DIR>/dem2mesh /usr/local/bin/
)
ExternalProject_Add(mvs-texturing
GIT_REPOSITORY https://github.com/OpenDroneMap/mvs-texturing
GIT_TAG 101
UPDATE_COMMAND ""
CMAKE_ARGS
-DRESEARCH=OFF
-DCMAKE_BUILD_TYPE:STRING=Release
)
ExternalProject_Add(zstd
GIT_REPOSITORY https://github.com/facebook/zstd
GIT_TAG b84274da0f641907dfe472d5da132d872202e9b8
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DZSTD_BUILD_PROGRAMS=OFF -DCMAKE_BUILD_TYPE:STRING=Release
<SOURCE_DIR>/build/cmake
)
ExternalProject_Add(hexer
URL https://github.com/hobu/hexer/archive/bc748fc16b51c562f68f6641574b7af4244adfa2.tar.gz
UPDATE_COMMAND ""
)
set(_proj_name laszip)
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
ExternalProject_Add(laszip
URL https://github.com/LASzip/LASzip/archive/0069c42307183c49744f1eb170f7032a8cf6a9db.zip
UPDATE_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS=ON
-DBUILD_STATIC_LIBS=OFF
-DCMAKE_INSTALL_LIBDIR=lib
)
ExternalProject_Add(pdal
DEPENDS zstd hexer laszip
URL https://github.com/PDAL/PDAL/archive/2.1.0.zip
CMAKE_ARGS
-DBUILD_PGPOINTCLOUD_TESTS=OFF
-DBUILD_PLUGIN_PGPOINTCLOUD=OFF
-DBUILD_PLUGIN_CPD=OFF
-DBUILD_PLUGIN_GREYHOUND=OFF
-DBUILD_PLUGIN_HEXBIN=ON
-DBUILD_PLUGIN_ICEBRIDGE=OFF
-DBUILD_PLUGIN_MRSID=OFF
-DBUILD_PLUGIN_NITF=OFF
-DBUILD_PLUGIN_OCI=OFF
-DBUILD_PLUGIN_P2G=OFF
-DBUILD_PLUGIN_SQLITE=OFF
-DBUILD_PLUGIN_RIVLIB=OFF
-DBUILD_PLUGIN_PYTHON=OFF
-DWITH_ZSTD=ON
-DENABLE_CTEST=OFF
-DWITH_APPS=ON
-DWITH_LAZPERF=OFF
-DWITH_GEOTIFF=ON
-DWITH_LASZIP=ON
-DLASZIP_FOUND=TRUE
-DLASZIP_LIBRARIES=/usr/local/lib/liblaszip.so
-DLASZIP_VERSION=3.1.1
-DLASZIP_INCLUDE_DIR=/usr/local/include
-DLASZIP_LIBRARY=/usr/local/lib/liblaszip.so
-DWITH_TESTS=OFF
-DCMAKE_BUILD_TYPE=Release
)
ExternalProject_Add(entwine
DEPENDS pdal
GIT_REPOSITORY https://github.com/connormanning/entwine/
GIT_TAG 2.1.0
UPDATE_COMMAND ""
CMAKE_ARGS
-DCMAKE_CXX_FLAGS=-isystem
-DWITH_TESTS=OFF
-DCMAKE_BUILD_TYPE=Release
INSTALL_COMMAND cd <BINARY_DIR> && make install
)
ExternalProject_Add(pcl
URL https://github.com/OpenDroneMap/pcl/archive/master.zip
UPDATE_COMMAND ""
CMAKE_ARGS
-DBUILD_features=OFF
-DBUILD_filters=OFF
-DBUILD_geometry=OFF
-DBUILD_keypoints=OFF
-DBUILD_outofcore=OFF
-DBUILD_people=OFF
-DBUILD_recognition=OFF
-DBUILD_registration=OFF
-DBUILD_sample_consensus=OFF
-DBUILD_segmentation=OFF
-DBUILD_features=OFF
-DBUILD_surface_on_nurbs=OFF
-DBUILD_tools=OFF
-DBUILD_tracking=OFF
-DBUILD_visualization=OFF
-DWITH_QT=OFF
-DBUILD_OPENNI=OFF
-DBUILD_OPENNI2=OFF
-DWITH_OPENNI=OFF
-DWITH_OPENNI2=OFF
-DWITH_FZAPI=OFF
-DWITH_LIBUSB=OFF
-DWITH_PCAP=OFF
-DWITH_PXCAPI=OFF
-DCMAKE_BUILD_TYPE=Release
-DPCL_VERBOSITY_LEVEL=Error
)
ExternalProject_Add(opencv
URL https://github.com/opencv/opencv/archive/3.4.6.zip
UPDATE_COMMAND ""
CMAKE_ARGS
-DBUILD_opencv_core=ON
-DBUILD_opencv_imgproc=ON
-DBUILD_opencv_highgui=ON
-DBUILD_opencv_video=ON
-DBUILD_opencv_ml=ON
-DBUILD_opencv_features2d=ON
-DBUILD_opencv_calib3d=ON
-DBUILD_opencv_contrib=OFF
-DBUILD_opencv_flann=ON
-DBUILD_opencv_objdetect=ON
-DBUILD_opencv_photo=ON
-DBUILD_opencv_legacy=ON
-DBUILD_opencv_python=ON
-DWITH_FFMPEG=OFF
-DWITH_CUDA=OFF
-DWITH_GTK=OFF
-DWITH_VTK=OFF
-DWITH_EIGEN=OFF
-DWITH_OPENNI=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_PERF_TESTS=OFF
-DBUILD_DOCS=OFF
-DBUILD_opencv_apps=OFF
-DBUILD_opencv_gpu=OFF
-DBUILD_opencv_videostab=OFF
-DBUILD_opencv_nonfree=OFF
-DBUILD_opencv_stitching=OFF
-DBUILD_opencv_world=OFF
-DBUILD_opencv_superres=OFF
-DBUILD_opencv_java=OFF
-DBUILD_opencv_ocl=OFF
-DBUILD_opencv_ts=OFF
-DBUILD_opencv_xfeatures2d=OFF
-DCMAKE_BUILD_TYPE:STRING=Release
)
ExternalProject_Add(mve
GIT_REPOSITORY https://github.com/OpenDroneMap/mve
GIT_TAG 099
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND make
INSTALL_COMMAND cp <SOURCE_DIR>/apps/makescene/makescene /usr/local/bin &&
cp <SOURCE_DIR>/apps/dmrecon/dmrecon /usr/local/bin/ &&
cp <SOURCE_DIR>/apps/scene2pset/scene2pset /usr/local/bin/ &&
cp <SOURCE_DIR>/apps/meshclean/meshclean /usr/local/bin/
)