-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
355 lines (313 loc) · 10.2 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# author: Sebastian Blumenthal
# date: 2009-09-09
# add include directories
INCLUDE_DIRECTORIES(
.
${CMAKE_HOME_DIRECTORY}/src
${OPENCV_INCLUDE_DIR}
${CMAKE_HOME_DIRECTORY}/external
${Boost_INCLUDE_DIR}
${OPENSCENEGRAPH_INCLUDE_DIRS}
${STANN_INCLUDE_DIRS}
${HDF5_CXX_INCLUDE_DIR}
)
IF (USE_EIGEN3)
INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS})
ELSE (USE_EIGEN3)
INCLUDE_DIRECTORIES(${EIGEN2_INCLUDE_DIR})
ENDIF (USE_EIGEN3)
LINK_DIRECTORIES(
${OpenCV_LINK_DIRECTORIES}
)
# compile and link the executables
IF (USE_OPENCV)
ADD_EXECUTABLE(depth_image_stream_test depth_image_stream_test)
TARGET_LINK_LIBRARIES(depth_image_stream_test brics3d_core brics3d_algorithm brics3d_util)
ADD_EXECUTABLE(depth_image_transformation depth_image_transformation)
TARGET_LINK_LIBRARIES(depth_image_transformation brics3d_core brics3d_algorithm brics3d_util)
ENDIF(USE_OPENCV)
IF (USE_OSG)
IF (USE_OPENCV)
ADD_EXECUTABLE(BRICS_3D_Demo BRICS_3D_Demo)
TARGET_LINK_LIBRARIES(BRICS_3D_Demo
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(osg_point_plotter osg_point_plotter)
TARGET_LINK_LIBRARIES(osg_point_plotter
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ENDIF(USE_OPENCV)
ADD_EXECUTABLE(osg_triangle_plotter osg_triangle_plotter)
TARGET_LINK_LIBRARIES(osg_triangle_plotter
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(pointcloud_viewer pointcloud_viewer)
TARGET_LINK_LIBRARIES(pointcloud_viewer
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(icp_test icp_test)
TARGET_LINK_LIBRARIES(icp_test
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(icp_benchmark icp_benchmark)
TARGET_LINK_LIBRARIES(icp_benchmark
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(point3D_benchmark point3D_benchmark)
TARGET_LINK_LIBRARIES(point3D_benchmark
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
ADD_EXECUTABLE(demoSegmentationPlane demoSegmentationPlane)
TARGET_LINK_LIBRARIES(demoSegmentationPlane
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
)
IF (USE_PCL AND USE_EIGEN3)
INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS} ${OPENNI_INCLUDE_DIRS})
ADD_EXECUTABLE(kinect_test kinect_test)
TARGET_LINK_LIBRARIES(kinect_test
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${PCL_IO_LIBRARY}
)
ADD_EXECUTABLE(extract_object_clusters extract_object_clusters)
TARGET_LINK_LIBRARIES(extract_object_clusters
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${PCL_IO_LIBRARY}
)
ADD_EXECUTABLE(wm_kinect_test wm_kinect_test)
TARGET_LINK_LIBRARIES(wm_kinect_test
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${PCL_IO_LIBRARY}
)
ADD_EXECUTABLE(wm_iterator_test wm_iterator_test)
TARGET_LINK_LIBRARIES(wm_iterator_test
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${PCL_IO_LIBRARY}
)
ENDIF(USE_PCL AND USE_EIGEN3)
ADD_EXECUTABLE(wm_processing wm_processing)
TARGET_LINK_LIBRARIES(wm_processing
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
)
# FIXME
# ADD_EXECUTABLE(wm_function_blocks wm_function_blocks)
# TARGET_LINK_LIBRARIES(wm_function_blocks
# brics3d_world_model
# brics3d_algorithm
# brics3d_util
# brics3d_core
# ${OSG_LIBRARY_DEBUG}
# ${OSGGA_LIBRARY_DEBUG}
# ${OSGVIEWER_LIBRARY_DEBUG}
# ${OSGUTIL_LIBRARY_DEBUG}
# ${OSGTEXT_LIBRARY_DEBUG}
# )
ADD_EXECUTABLE(wm_uncertain_transforms wm_uncertain_transforms)
TARGET_LINK_LIBRARIES(wm_uncertain_transforms
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
)
IF (USE_HDF5)
message(STATUS "INFO: used HDF5_LIBRARIES: ${HDF5_LIBRARIES}")
ADD_EXECUTABLE(wm_hdf5_test wm_hdf5_test)
TARGET_LINK_LIBRARIES(wm_hdf5_test
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
${HDF5_LIBRARIES}
)
ADD_EXECUTABLE(wm_hdf5 wm_hdf5)
TARGET_LINK_LIBRARIES(wm_hdf5
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
${HDF5_LIBRARIES}
)
ADD_EXECUTABLE(wm_udp_hdf5_test wm_udp_hdf5_test)
TARGET_LINK_LIBRARIES(wm_udp_hdf5_test
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
${HDF5_LIBRARIES}
)
ENDIF(USE_HDF5)
IF(USE_JSON)
INCLUDE_DIRECTORIES({LIBVARIANT_INCLUDE_DIRS})
ADD_EXECUTABLE(wm_json wm_json)
TARGET_LINK_LIBRARIES(wm_json
brics3d_world_model
brics3d_core
brics3d_algorithm
brics3d_util
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
${LIBVARIANT_LIBRARIES}
)
ADD_EXECUTABLE(wm_udp_json_test wm_udp_json_test)
TARGET_LINK_LIBRARIES(wm_udp_json_test
brics3d_world_model
brics3d_algorithm
brics3d_util
brics3d_core
${OSG_LIBRARY_DEBUG}
${OSGGA_LIBRARY_DEBUG}
${OSGVIEWER_LIBRARY_DEBUG}
${OSGUTIL_LIBRARY_DEBUG}
${OSGTEXT_LIBRARY_DEBUG}
${LIBVARIANT_LIBRARIES}
pthread
)
ENDIF(USE_JSON)
# ADD_EXECUTABLE(rsg_generated /home/sblume/eclipse_workspaces/runtime-EclipseXtext/WM/src-gen/rsg_main_generated.cpp)
# TARGET_LINK_LIBRARIES(rsg_generated
# brics3d_world_model
# brics3d_algorithm
# brics3d_util
# brics3d_core
# ${OSG_LIBRARY_DEBUG}
# ${OSGGA_LIBRARY_DEBUG}
# ${OSGVIEWER_LIBRARY_DEBUG}
# ${OSGUTIL_LIBRARY_DEBUG}
# )
ELSE(USE_OSG)
#version as above but without OSG visualization
IF (USE_HDF5)
#message(STATUS "INFO: wm_hdf5_test_no_osg used HDF5_LIBRARIES: ${HDF5_LIBRARIES}")
#ADD_EXECUTABLE(wm_hdf5_test_no_osg wm_hdf5_test)
#TARGET_LINK_LIBRARIES(wm_hdf5_test_no_osg
# brics3d_world_model
# brics3d_algorithm
# brics3d_util
# brics3d_core
# ${HDF5_LIBRARIES}
# )
#ADD_EXECUTABLE(wm_udp_hdf5_test_no_osg wm_udp_hdf5_test)
#TARGET_LINK_LIBRARIES(wm_udp_hdf5_test_no_osg
# brics3d_world_model
# brics3d_algorithm
# brics3d_util
# brics3d_core
# ${HDF5_LIBRARIES}
# )
# TODO does not compile for now
ENDIF(USE_HDF5)
ENDIF(USE_OSG)
ADD_EXECUTABLE(rigidTransformation_benchmark rigidTransformation_benchmark)
TARGET_LINK_LIBRARIES(rigidTransformation_benchmark brics3d_core brics3d_algorithm brics3d_util)
ADD_EXECUTABLE(pointCorrespondence_benchmark pointCorrespondence_benchmark)
TARGET_LINK_LIBRARIES(pointCorrespondence_benchmark brics3d_core brics3d_algorithm brics3d_util)
#ADD_DEFINITIONS(-DMAX_OPENMP_NUM_THREADS=4 -DOPENMP_NUM_THREADS=4)
IF(NOT WIN32)
ADD_DEFINITIONS(-Wno-deprecated) # suppress warnings regarding beackward compability
ENDIF(NOT WIN32)
#Executables for evaluation and comparison demo
ADD_EXECUTABLE(demoEvaluation demoEvaluation)
TARGET_LINK_LIBRARIES(demoEvaluation brics3d_algorithm)
ADD_EXECUTABLE(demoComparison demoComparison)
TARGET_LINK_LIBRARIES(demoComparison brics3d_algorithm)
#Executables for 3D segmentation demo
ADD_EXECUTABLE(demoSegmentationNormalPlane demoSegmentationNormalPlane)
TARGET_LINK_LIBRARIES(demoSegmentationNormalPlane brics3d_algorithm)
ADD_SUBDIRECTORY(wm_tutorial_1)
IF(USE_OSG)
ADD_SUBDIRECTORY(wm_tutorial_2)
ENDIF(USE_OSG)
ADD_SUBDIRECTORY(wm_function_blocks)