-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
81 lines (60 loc) · 3.43 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
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(superquadrics_visualize)
find_package(PCL 1.7 REQUIRED io common segmentation sample_consensus surface visualization)
include_directories(${PCL_INCLUDE_DIRS} include/)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
find_package (Ceres REQUIRED)
include_directories (${CERES_INCLUDES})
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
set (framework_incs include/fit_superquadric_lm.h
include/fit_superquadric_ceres.h
include/superquadric_formulas.h
include/sample_superquadric.h
include/sample_superquadric_uniform.h
include/segmentation_utils.h
include/tabletop_segmentation.h
include/superquadric_detection.h
include/superquadric_rigid_registration.h)
set (framework_impls include/impl/fit_superquadric_lm.hpp
include/impl/fit_superquadric_ceres.hpp
include/impl/superquadric_formulas.hpp
include/impl/sample_superquadric.hpp
include/impl/sample_superquadric_uniform.hpp
include/impl/segmentation_utils.hpp
include/impl/tabletop_segmentation.hpp
include/impl/superquadric_detection.hpp
include/impl/superquadric_rigid_registration.hpp)
set (framework_srcs src/fit_superquadric_lm.cpp
src/fit_superquadric_ceres.cpp
src/sample_superquadric.cpp
src/sample_superquadric_uniform.cpp
src/segmentation_utils.cpp
src/tabletop_segmentation.cpp
src/superquadric_detection.cpp
src/superquadric_rigid_registration.cpp)
ADD_LIBRARY (superquadrics_framework ${framework_incs} ${framework_impls} ${framework_srcs})
TARGET_LINK_LIBRARIES (superquadrics_framework)
set (libs_to_link ${PCL_LIBRARIES} ${CERES_LIBRARIES} superquadrics_framework)
add_executable (sample_superquadric_vtk MACOSX_BUNDLE src/main_sample_superquadric_vtk.cpp)
target_link_libraries (sample_superquadric_vtk ${PCL_LIBRARIES})
add_executable (sample_superquadric src/main_sample_superquadric.cpp)
target_link_libraries (sample_superquadric ${libs_to_link})
add_executable (fit_superquadric_to_samples MACOSX_BUNDLE src/main_fit_superquadric_to_samples.cpp)
target_link_libraries (fit_superquadric_to_samples ${PCL_LIBRARIES} superquadrics_framework)
add_executable (split_and_merge MACOSX_BUNDLE src/main_split_and_merge.cpp)
target_link_libraries (split_and_merge ${libs_to_link})
add_executable (fit_superquadric_ceres src/main_fit_superquadric_ceres.cpp)
target_link_libraries (fit_superquadric_ceres ${libs_to_link})
add_executable (tabletop_segmentation MACOSX_BUNDLE src/main_tabletop_segmentation.cpp)
target_link_libraries (tabletop_segmentation ${libs_to_link})
add_executable (segmentation_n_fitting_pipeline MACOSX_BUNDLE src/main_segmentation_n_fitting_pipeline.cpp)
target_link_libraries (segmentation_n_fitting_pipeline ${libs_to_link})
add_executable (segmentation_n_detection MACOSX_BUNDLE src/main_segmentation_n_detection.cpp)
target_link_libraries (segmentation_n_detection ${libs_to_link})
add_executable (tests src/main_tests.cpp)
target_link_libraries (tests ${libs_to_link})