-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
executable file
·112 lines (97 loc) · 2.78 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
cmake_minimum_required(VERSION 3.10)
project(outram)
set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_INSTALL_RPATH "/usr/local/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif ()
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
message_generation
sensor_msgs
nav_msgs
pcl_ros
cv_bridge
eigen_conversions
)
find_package(OpenCV REQUIRED)
find_package(OpenCV REQUIRED QUIET)
find_package(OpenMP)
find_package(PCL 1.8 REQUIRED)
find_package(Boost 1.54 REQUIRED)
find_package(Eigen3 3.2 QUIET REQUIRED NO_MODULE)
find_package(Ceres REQUIRED)
add_message_files(
FILES
cloud_info.msg
)
generate_messages(
DEPENDENCIES
geometry_msgs
std_msgs
nav_msgs
)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
nano_gicp
nanoflann
CATKIN_DEPENDS
roscpp
rospy
std_msgs
)
include_directories(include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
add_definitions(${PCL_DEFINITIONS})
link_directories(${PCL_LIBRARY_DIRS})
if (OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif ()
# Parallel Maximum Clique (pmc)
configure_file(pmc/pmc.CMakeLists.txt.in pmc-download/CMakeLists.txt)
execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pmc-download")
execute_process(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pmc-download")
add_subdirectory("${CMAKE_BINARY_DIR}/pmc-src" #CMAKE_BINARY_DIR =>
"${CMAKE_BINARY_DIR}/pmc-build")
# NanoFLANN
add_library(nanoflann SHARED
src/nano_gicp/nanoflann.cc
)
target_link_libraries(nanoflann ${PCL_LIBRARIES})
target_include_directories(nanoflann PUBLIC include ${PCL_INCLUDE_DIRS})
####### Executable #######
set(outram_src
src/registration.cc
src/graph.cc
src/teaser_utils/feature_matcher.cc
src/teaser_utils/fpfh.cc
src/semantic_teaser.cpp
src/STDesc.cpp
)
add_executable(global_localization examples/global_localization.cpp ${outram_src} )
add_dependencies(global_localization ${catkin_EXPORTED_TARGETS})
target_compile_options(global_localization PRIVATE ${OpenMP_FLAGS})
target_link_libraries(global_localization
PUBLIC
${PCL_LIBRARIES}
${catkin_LIBRARIES}
${OpenMP_LIBS}
${CERES_LIBRARIES}
stdc++fs
pmc
)