-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·854 lines (774 loc) · 28.6 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
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
cmake_minimum_required(VERSION 3.10)
project(mesh-tools)
################################################################################
# Include CMake dependencies
################################################################################
# CMAKE_MODULE_PATH needs to be set for cmake to find the other CMakeLists.txt in ./cmake/
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
message(STATUS "cmake location: ${CMAKE_INSTALL_PREFIX}")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
# print which compiler is used
message(STATUS "used compiler: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "used compiler version: ${CMAKE_CXX_COMPILER_VERSION}")
################################################################################
# Build Options
################################################################################
option(OPENMP_ENABLED "Whether to enable OpenMP support" ON)
option(O3D_ENABLED "Whether to enable OPEN3D" OFF)
option(PCL_ENABLED "Whether to enable PCL" OFF)
option(OMVS_ENABLED "Whether to enable OpenMVS, also enables OpenCV" OFF)
option(COLMAP_ENABLED "Wether to enable colmap support" OFF)
option(RECONBENCH_ENABLED "Wether to enable reconbench support" OFF)
option(STATIC "Whether to compile for standalone use" OFF)
################################################################################
# Programs to build
################################################################################
option(SCAN "Whether to build scan exe" ON)
option(OMVS2NPZ "Whether to build omvs2npz exe" OFF)
option(LABATUT "Whether to build labatut exe" OFF)
option(FEAT "Whether to build feat exe" OFF)
option(OCC2MESH "Whether to build occ2mesh exe" OFF)
option(NORMAL "Whether to build normal exe" OFF)
option(SAMPLE "Whether to build sample exe" OFF)
option(COLLAPSE "Whether to build collapse exe" OFF)
option(SIMPLIFY "Whether to build simplify exe" OFF)
option(WATERTIGHTIFY "Whether to build watertightify exe" OFF)
option(EVAL "Whether to build eval exe" OFF)
if(STATIC)
set(CMAKE_EXE_LINKER_FLAGS "-static")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif()
if(CMAKE_BUILD_TYPE)
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
else()
set(CMAKE_BUILD_TYPE Debug)
message(STATUS "CMAKE_BUILD_TYPE (default): ${CMAKE_BUILD_TYPE}")
set(IS_DEBUG ON)
endif()
### surpress some warnings when make
### taken from the cmake file here: http://www.open3d.org/docs/release/tutorial/C++/cplusplus_interface.html
if(UNIX)
add_definitions(-DUNIX)
add_compile_options(-Wno-deprecated-declarations)
add_compile_options(-Wno-unused-result)
add_compile_options(-Wno-all -Wno-attributes -Wno-enum-compare -Wno-delete-incomplete)
add_definitions(-O3)
endif(UNIX)
### to surpress ROOT variable is set warning, taken from: https://gitlab.kitware.com/vtk/vtk/commit/e6f4ab044acba1363c16eda552ecb691557cdfd5
foreach(policy
CMP0074 # CMake 3.12
)
if(POLICY ${policy})
cmake_policy(SET ${policy} NEW)
endif()
endforeach()
################################################################################
# Find packages
################################################################################
if(COLMAP_ENABLED)
find_package(Glew REQUIRED)
endif()
if(STATIC)
set(GMP_USE_STATIC_LIBS ON)
set(MPFR_STATIC_LIBRARY TRUE)
set(OpenCV_STATIC ON)
set(OpenCV_SHARED OFF)
set(ZLIB_STATIC ON)
set(CGAL_Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_LIBS ON)
endif()
#find_package(GMP REQUIRED) # is automatically linked by cgal
#find_package(MPFR REQUIRED)
#find_package(GCO REQUIRED) # added gco to external
find_package(xtl REQUIRED) # for xtensor
find_package(ZLIB REQUIRED) # for xtensor
find_package(xtensor REQUIRED)
find_package(xtensor-io REQUIRED)
####################################
############### EIGEN ##############
####################################
FIND_PACKAGE(Eigen REQUIRED)
#if(EIGEN_FOUND)
# INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS})
# ADD_DEFINITIONS(${EIGEN_DEFINITIONS} -D_USE_EIGEN)
# SET(_USE_EIGEN TRUE)
#endif()
if(IS_GNU)
# Hide incorrect warnings for uninitialized Eigen variables under GCC.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-maybe-uninitialized")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
list(APPEND CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized")
endif()
if(IS_DEBUG)
add_definitions("-DEIGEN_INITIALIZE_MATRICES_BY_NAN")
endif()
####################################
################ GLOG ##############
####################################
#find_package(Glog REQUIRED)
if(IS_MSVC)
# Some fixes for the Glog library.
add_definitions("-DGLOG_NO_ABBREVIATED_SEVERITIES")
add_definitions("-DGL_GLEXT_PROTOTYPES")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
list(APPEND CMAKE_CXX_FLAGS "/EHsc")
# # Enable object level parallel builds in Visual Studio.
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
####################################
############ RECONBENCH ############
####################################
if(RECONBENCH_ENABLED)
# what I am actually doing here is linking the two libraries OpenMesh and ANN that are needed for the reconbench code
# instead of linking the versions provided by reconbench I should install them on the machine and link to that
# but probably then I should also do the same for the reconbench code itself.
# question is just if the recent versions of these libs are compatible with the reconbench code
add_definitions(-DRECONBENCH)
# LAPACK (global), OpenMesh and ANN is needed for reconbench
find_package(LAPACK)
list(APPEND RECONBENCH_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES})
list(APPEND RECONBENCH_INCLUDE_DIRS /home/rsulzer/cpp/reconbench-CMake/OpenMesh)
list(APPEND RECONBENCH_EXTERNAL_LIBRARIES /home/rsulzer/cpp/reconbench-CMake/OpenMesh/build/libOpenMesh.a)
list(APPEND RECONBENCH_INCLUDE_DIRS /home/rsulzer/cpp/reconbench-CMake/ann/include/ANN)
list(APPEND RECONBENCH_EXTERNAL_LIBRARIES /home/rsulzer/cpp/reconbench-CMake/ann/build/libann.a)
# TODO: make the includes for this as a releative path, like this:
# set(RECONBENCH_HOME ${CMAKE_CURRENT_SOURCE_DIR}/../reconbench-CMake/)
# this just collects all the cpp files in the modeling directory
file(GLOB_RECURSE RECONBENCH_CPP_FILES external/modeling/*.cpp)
endif()
####################################
################ PCL ###############
####################################
if(PCL_ENABLED)
add_definitions(-DPCL)
find_package(PCL 1.7 REQUIRED)
if(PCL_FOUND)
list(APPEND PCL_INCLUDE_DIRS ${PCL_INCLUDE_DIRS})
list(APPEND PCL_EXTERNAL_LIBRARIES ${PCL_LIBRARIES})
link_directories(${PCL_LIBRARY_DIRS})
# list(APPEND PCL_CPP_FILES
# src/IO/ethIO.cpp
# src/IO/tinyxml2.cpp
# src/IO/meshlab_project.cc)
add_definitions(${PCL_DEFINITIONS})
endif()
endif()
####################################
############## OPENMVS #############
####################################
if(OMVS_ENABLED)
add_definitions(-DOpenMVS)
#find_package(OpenMVS REQUIRED)
# it is important that cmake finds this file:
# ${CMAKE_INSTALL_PREFIX}/lib/CMake/OpenMVS/OpenMVSConfig.cmake, which will only be there if you do make install
# after compiling OpenMVS. Afterwards the ${OpenMVS_INCLUDE_DIRS}" should point to the installed headers in
# /usr/local/lib/CMake/OpenMVS/../../../include/OpenMVS and not to your github OpenMVS folder, because then the paths are not
# correct. Also I found that you have to build OpenMVS with shared libraries activated.
# UPDATE: building OpenMVS with -DSHARED_LIBS_ON=TRUE does not work anymore. Problem is OpenCV, could try to compile OpenCV from source
# or try with OpenMVS 2.0
find_package(OpenMVS HINTS ${CMAKE_INSTALL_PREFIX}/lib/CMake REQUIRED)
if(OpenMVS_FOUND)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cxx_default}")
# warning: OpenMVS does not work with CXX_FLAG -D_GLIBCXX_USE_CXX11_ABI=0
# which e.g. the default setting for Open3D compilation includes
list(APPEND CMAKE_CXX_FLAGS ${cxx_default})
ADD_DEFINITIONS(${OpenMVS_DEFINITIONS})
message(STATUS "Found OpenMVS ${OpenMVS_VERSION}")
message(STATUS " Includes : ${OpenMVS_INCLUDE_DIRS}")
message(STATUS " Libraries : ${OpenMVS_LIBRARIES}")
list(APPEND OMVS_INCLUDE_DIRS ${OpenMVS_INCLUDE_DIRS})
list(APPEND OMVS_EXTERNAL_LIBRARIES ${OpenMVS_LIBRARIES} dl MVS)
else()
message(SEND_ERROR "OpenMVS not found")
endif()
endif()
####################################
############## COLMAP ##############
####################################
set(COLMAP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../colmap/build)
if(COLMAP_ENABLED)
set(COLMAP_DIR /usr/local/share/colmap)
find_package(COLMAP REQUIRED)
add_definitions(-DCOLMAP)
if(COLMAP_FOUND)
message(STATUS "Found COLMAP")
message(STATUS "Be aware that colmap works best with eigen version 3.3.3!")
list(APPEND COLMAP_INCLUDE_DIRS ${COLMAP_INCLUDE_DIRS})
list(APPEND COLMAP_EXTERNAL_LIBRARIES ${COLMAP_LIBRARIES})
list(APPEND CPP_FILES src/IO/colmapIO.cpp)
link_directories(${COLMAP_LINK_DIRS})
else()
message(SEND_ERROR "COLMAP enabled but not found")
endif()
endif()
####################################
############## OPEN3D ##############
####################################
if(O3D_ENABLED)
message(STATUS "open3d is enabled")
add_definitions(-DOpen3D)
find_package(Open3D HINTS ${CMAKE_INSTALL_PREFIX}/lib/CMake)
if(Open3D_FOUND)
# IMPORTANT: OPEN3D NEEDS TO BE BUILD WITH THIS CMAKE COMMAND
# cmake -DBUILD_EIGEN3=ON -DBUILD_GLEW=ON -DBUILD_GLFW=ON -DBUILD_JSONCPP=OFF -DBUILD_PNG=OFF -DGLIBCXX_USE_CXX11_ABI=ON -DBUILD_UNIT_TESTS=ON ..
# on Ubuntu 16.04 also this needs to be added BUILD_FILAMENT_FROM_SOURCE=ON
# the important thing is probably -DGLIBCXX_USE_CXX11_ABI=ON
# see here: https://github.com/intel-isl/Open3D/issues/2286
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Open3D_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Open3D_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${Open3D_EXE_LINKER_FLAGS}")
# set(GLIBCXX_USE_CXX11_ABI ON)
list(APPEND Open3D_LIBRARIES dl)
message(STATUS "Found Open3D ${Open3D_VERSION}")
message(STATUS " Includes : ${Open3D_INCLUDE_DIRS}")
message(STATUS " Libraries : ${Open3D_LIBRARIES}")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Open3D_C_FLAGS}")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Open3D_CXX_FLAGS}")
# list(APPEND CMAKE_CXX_FLAGS ${Open3D_CXX_FLAGS})
# list(APPEND CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0 -fPIC")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${Open3D_EXE_LINKER_FLAGS}")
# list(APPEND O3D_INCLUDE_DIRS ${Open3D_INCLUDE_DIRS})
# list(APPEND O3D_EXTERNAL_LIBRARIES ${Open3D_LIBRARIES})
link_directories(${Open3D_LIBRARY_DIRS})
else()
message(SEND_ERROR "Open3D not found")
endif()
endif()
####################################
############## OPENMP ##############
####################################
if(OPENMP_ENABLED)
# see here how to link it since cmake 3.9: https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
message(STATUS "Enabling OpenMP support")
## target_link_libraries(sure PUBLIC OpenMP::OpenMP_CXX)
# add_definitions("-DOPENMP_ENABLED")
## list(APPEND CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
### set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
## list(APPEND CMAKE_CXX_FLAGS ${OpenMP_CXX_FLAGS})
## set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else()
message(STATUS "OpenMP enabled but not found!")
endif()
else()
if(OMVS_ENABLED)
message(STATUS "CAREFUL! OPENMP IS PROBABLY NEEDED FOR OPEN_MVS!!")
endif()
message(STATUS "Disabling OpenMP support")
endif()
####################################
############### CNPY ###############
####################################
#find_package(CNPY REQUIRED)
## not really necessary, was just for maybe replacing xtensor to load NPY files.
####################################
############### CGAL ###############
####################################
set(CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG 1)
set(CGAL_PMP_REMOVE_SELF_INTERSECTION_OUTPUT 1)
# to use local CGAL one has to set Xpackage_DIR variable to the path where the XpackageConfig.cmake file is located
#set(CGAL_DIR /home/adminlocal/PhD/cpp/CGAL/lib/cmake/CGAL)
#find_package(CGAL 5.1.1 REQUIRED CONFIG)
find_package(CGAL REQUIRED CONFIG)
if(CGAL_FOUND)
set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE TRUE)
add_definitions( -DCGAL_MINOR_VERSION=${CGAL_MINOR_VERSION} )
message(STATUS "Found CGAL ${CGAL_VERSION}")
message(STATUS " Includes : ${CGAL_INCLUDE_DIRS}")
message(STATUS " Libraries : ${CGAL_LIBRARY}")
else()
message(STATUS "Disabling CGAL support")
endif()
#set(CGAL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../CGAL/)
####################################
############## BOOST ###############
####################################
# adding boost explicitly after CGAL because CGAL also calls find_package(boost)
# but without the required components, and thus sets Boost_Libraries to empty.
FIND_PACKAGE(Boost REQUIRED COMPONENTS iostreams program_options system serialization filesystem)
if(Boost_FOUND)
ADD_DEFINITIONS(${Boost_DEFINITIONS} -D_USE_BOOST)
SET(_USE_BOOST TRUE)
endif()
message("boost libs: " ${Boost_LIBRARIES})
####################################
############## OPENCV ##############
####################################
if(OMVS_ENABLED)
FIND_PACKAGE(OpenCV REQUIRED)
if(OpenCV_FOUND)
# INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
ADD_DEFINITIONS(${OpenCV_DEFINITIONS})
SET(_USE_OPENCV TRUE)
MESSAGE(STATUS "OpenCV ${OpenCV_VERSION} found (include: ${OpenCV_INCLUDE_DIRS})")
list(APPEND OCV_EXTERNAL_LIBRARIES ${OpenCV_LIBS})
# message("OpenCV libs: ${OpenCV_LIBS}")
else()
MESSAGE("-- Can't find OpenCV. Please specify OpenCV directory using OpenCV_DIR variable")
endif()
endif()
################################################################################
############################### BUILD PROJECT ##################################
################################################################################
include_directories(
src
external
${EIGEN_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
# ${GLEW_INCLUDE_DIRS}
${GMP_INCLUDE_DIR}
${MPFR_INCLUDE_DIR}
# ${GCO_ROOT}
${CGAL_INCLUDE_DIRS}
${xtensor_INCLUDE_DIRS}
${xtensor-io_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${OMVS_INCLUDE_DIRS}
${RECONBENCH_INCLUDE_DIRS}
# ${O3D_INCLUDE_DIRS}
${Open3D_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
# link directories should not be necessary, see:
# https://cmake.org/cmake/help/v3.0/command/link_directories.html
#if(COLMAP_ENABLED)
# link_directories(${COLMAP_LINK_DIRS})
#endif()
#if(O3D_ENABLED)
# link_directories(${Open3D_LIBRARY_DIRS})
#endif()
#message("CMAKE_CXX_FLAGS: " "${CMAKE_CXX_FLAGS}")
#message("CMAKE_CXX_LINKER_FLAGS: " "${CMAKE_LINKER_FLAGS}")
add_library(rPLY
external/rPLY/mesh.cpp
external/rPLY/ply.cpp
external/rPLY/rply.c)
add_library(util
src/util/geometricOperations.cpp
src/util/helper.cpp
)
target_link_libraries(util
CGAL::CGAL
)
add_library(mtIO
src/IO/fileIO.cpp
src/IO/inputParser.cpp
${OpenMVS_INCLUDE_DIRS}
)
target_link_libraries(mtIO
# ${CNPY_LIBRARY}
# ${CMAKE_DL_LIBS}
ZLIB::ZLIB
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES}
${Open3D_LIBRARIES}
)
add_library(learning
src/learning/learning.cpp
# src/learning/learningIO.cpp
src/learning/learningIO_bin.cpp
src/learning/learningMath.cpp
src/learning/rayTracing.cpp
# src/learning/rayTracingGroundTruth.cpp
)
target_link_libraries(learning
util
ZLIB::ZLIB
)
add_library(processing
src/processing/evaluation.cpp
src/processing/meshProcessing.cpp
src/processing/graphCut.cpp
src/processing/pointSetProcessing.cpp
src/processing/normalAndSensorProcessing.cpp
src/processing/field.cpp
)
target_link_libraries(processing
util
)
add_library(gco
external/gco-v3.0/GCoptimization.cpp
external/gco-v3.0/LinkedBlockList.cpp
# external/gco-v3.0/GCoptimization.h
# external/gco-v3.0/LinkedBlockList.h
# external/gco-v3.0/block.h
# external/gco-v3.0/energy.h
# external/gco-v3.0/graph.h
)
#target_link_libraries(gco)
if(LABATUT)
add_executable(labatut
src/labatut/main.cpp
src/labatut/rayTracingFacet.cpp
)
target_link_libraries(labatut
mtIO
rPLY
util
processing
gco
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
${RECONBENCH_EXTERNAL_LIBRARIES}
${PCL_EXTERNAL_LIBRARIES}
${Boost_LIBRARIES}
${CMAKE_DL_LIBS}
${GLOG_LIBRARIES}
${CERES_LIBRARIES}
# ${GCO_LIBRARY}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
OpenMP::OpenMP_CXX
ZLIB::ZLIB
xtensor
xtensor-io
)
endif()
if(OCC2MESH)
add_executable(occ2mesh
src/exe/occ2mesh.cpp
)
target_link_libraries(occ2mesh
mtIO
rPLY
learning
util
processing
gco
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
${RECONBENCH_EXTERNAL_LIBRARIES}
${PCL_EXTERNAL_LIBRARIES}
${Boost_LIBRARIES}
${CMAKE_DL_LIBS}
${GLOG_LIBRARIES}
${CERES_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
OpenMP::OpenMP_CXX
ZLIB::ZLIB
xtensor
xtensor-io
)
endif()
if(FEAT)
add_executable(feat
src/exe/feat.cpp
${OMVS_INCLUDE_DIRS}
)
target_link_libraries(feat
mtIO
learning
rPLY
util
processing
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
${RECONBENCH_EXTERNAL_LIBRARIES}
${PCL_EXTERNAL_LIBRARIES}
${Boost_LIBRARIES}
${GLOG_LIBRARIES}
${CERES_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
OpenMP::OpenMP_CXX
ZLIB::ZLIB
xtensor
xtensor-io
)
endif()
#if(GT)
# add_executable(gt
# src/exe/gt.cpp
# src/IO/inputParser.cpp
# ${OMVS_INCLUDE_DIRS}
# )
# target_link_libraries(gt
# IO
# learning
# rPLY
# util
# processing
# ${OCV_EXTERNAL_LIBRARIES}
# ${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
# ${RECONBENCH_EXTERNAL_LIBRARIES}
# ${PCL_EXTERNAL_LIBRARIES}
# ${Boost_LIBRARIES}
# ${GLOG_LIBRARIES}
# ${CERES_LIBRARIES}
# ${GMP_LIBRARY}
# ${MPFR_LIBRARY}
# ${Open3D_LIBRARIES}
# CGAL::CGAL
# OpenMP::OpenMP_CXX
# ZLIB::ZLIB
# xtensor
# xtensor-io
# )
#endif()
if(OMVS2NPZ)
add_executable(omvs2npz
src/exe/omvs2npz.cpp
${OMVS_INCLUDE_DIRS}
)
target_link_libraries(omvs2npz
mtIO
learning
rPLY
util
processing
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
${RECONBENCH_EXTERNAL_LIBRARIES}
${PCL_EXTERNAL_LIBRARIES}
${Boost_LIBRARIES}
${GLOG_LIBRARIES}
${CERES_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
OpenMP::OpenMP_CXX
xtensor
xtensor-io
# OpenMVS::MVS
)
endif()
if(SCAN)
add_executable(scan
src/exe/scan.cpp
)
target_link_libraries(scan
mtIO
rPLY
util
processing
learning
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
${CMAKE_DL_LIBS}
)
endif()
if(VSA)
add_executable(vsa
src/exe/vsa.cpp
)
target_link_libraries(vsa
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(COLLAPSE)
add_executable(collapse
src/exe/collapse.cpp
)
target_link_libraries(collapse
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(EVAL)
add_executable(eval
src/exe/eval.cpp
)
target_link_libraries(eval
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(ISO)
add_executable(iso
src/exe/iso.cpp
)
target_link_libraries(iso
mtIO
rPLY
util
processing
learning
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(SAMPLE)
add_executable(sample
src/exe/sample.cpp
)
target_link_libraries(sample
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
OpenMP::OpenMP_CXX
)
endif()
if(BOUNDINGBOX)
add_executable(boundingBox
src/exe/boundingBox.cpp
)
target_link_libraries(boundingBox
mtIO
rPLY
util
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
OpenMP::OpenMP_CXX
)
endif()
if(SIMPLIFY)
add_executable(simplify
src/exe/simplification.cpp
)
target_link_libraries(simplify
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(WATERTIGHTIFY)
add_executable(watertightify
src/exe/watertightify.cpp
)
target_link_libraries(watertightify
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${Open3D_LIBRARIES}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
)
endif()
if(NORMAL)
add_executable(normal
src/exe/normalEstimation.cpp
)
target_link_libraries(normal
mtIO
rPLY
util
processing
learning
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
${OMVS_EXTERNAL_LIBS}
OpenMP::OpenMP_CXX
${CMAKE_DL_LIBS}
)
endif()
if(ETH3D)
add_executable(eth3d
src/exe/eth3d.cpp
src/IO/ethIO.cpp
src/IO/tinyxml2.cpp
src/IO/meshlab_project.cc
)
target_link_libraries(eth3d
mtIO
rPLY
util
processing
${OCV_EXTERNAL_LIBRARIES}
${OMVS_EXTERNAL_LIBRARIES} # this has to be written before OpenMP for some reason
${PCL_EXTERNAL_LIBRARIES}
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
OpenMP::OpenMP_CXX
)
endif()
if(STATS)
add_executable(stats
src/exe/stats.cpp
)
target_link_libraries(stats
mtIO
rPLY
processing
util
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
CGAL::CGAL
OpenMP::OpenMP_CXX
)
endif()
if(POISSON)
add_executable(poisson
src/poisson/poisson.cpp
)
target_link_libraries(poisson
mtIO
rPLY
util
processing
${Boost_LIBRARIES}
${GMP_LIBRARY}
${MPFR_LIBRARY}
${CGAL_LIBRARY}
)
endif()