-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
206 lines (168 loc) · 3.56 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
cmake_minimum_required(VERSION 3.14)
project(map_builder)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
find_package(
beam REQUIRED
COMPONENTS
utils
mapping
calibration
)
find_package(octomap REQUIRED)
find_package(
catkin REQUIRED
COMPONENTS
std_msgs
message_generation
)
add_message_files(
FILES
ManualCalibrationMsg.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
CATKIN_DEPENDS
message_runtime
)
## Declare a C++ library
add_library(
${PROJECT_NAME}
src/MapBuilder.cpp
)
target_include_directories(${PROJECT_NAME}
PUBLIC
include
${OCTOMAP_INCLUDE_DIRS}
)
target_link_libraries(
${PROJECT_NAME}
beam::utils
beam::mapping
beam::calibration
${OCTOMAP_LIBRARIES}
)
################ Executables ###################
add_executable(${PROJECT_NAME}_build_map
src/build_map.cpp
)
target_include_directories(${PROJECT_NAME}_build_map
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_build_map
${PROJECT_NAME}
beam::utils
beam::mapping
)
add_executable(${PROJECT_NAME}_manual_calibration
src/manual_calibration.cpp
)
target_include_directories(${PROJECT_NAME}_manual_calibration
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_manual_calibration
${PROJECT_NAME}
beam::utils
beam::mapping
)
add_dependencies(${PROJECT_NAME}_manual_calibration
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
add_executable(${PROJECT_NAME}_loop_closed_paths_to_poses
src/loop_closed_paths_to_poses.cpp
)
target_include_directories(${PROJECT_NAME}_loop_closed_paths_to_poses
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_loop_closed_paths_to_poses
${PROJECT_NAME}
beam::utils
beam::mapping
beam::filtering
beam::calibration
)
add_executable(${PROJECT_NAME}_fill_in_trajectory
src/fill_in_trajectory.cpp
)
target_include_directories(${PROJECT_NAME}_fill_in_trajectory
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_fill_in_trajectory
${PROJECT_NAME}
beam::utils
beam::mapping
beam::calibration
)
add_executable(${PROJECT_NAME}_path_messages_to_poses_files
src/path_messages_to_pose_files.cpp
)
target_include_directories(${PROJECT_NAME}_path_messages_to_poses_files
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_path_messages_to_poses_files
${PROJECT_NAME}
beam::utils
beam::mapping
beam::filtering
beam::calibration
)
add_executable(${PROJECT_NAME}_bag_to_poses_file
src/bag_to_poses_file.cpp
)
target_include_directories(${PROJECT_NAME}_bag_to_poses_file
PUBLIC
)
target_link_libraries(${PROJECT_NAME}_bag_to_poses_file
beam::utils
beam::mapping
beam::filtering
beam::calibration
)
add_executable(${PROJECT_NAME}_poses_to_poses_file
src/poses_to_poses_file.cpp
)
target_include_directories(${PROJECT_NAME}_poses_to_poses_file
PUBLIC
)
target_link_libraries(${PROJECT_NAME}_poses_to_poses_file
beam::utils
beam::mapping
beam::filtering
beam::calibration
)
add_executable(${PROJECT_NAME}_append_trajectory
src/append_trajectory.cpp
)
target_include_directories(${PROJECT_NAME}_append_trajectory
PUBLIC
)
target_link_libraries(${PROJECT_NAME}_append_trajectory
beam::utils
beam::mapping
)
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
################ tests ##################
add_executable(${PROJECT_NAME}_map_builder_tests
tests/MapBuilderTest.cpp
)
target_include_directories(${PROJECT_NAME}_map_builder_tests
PUBLIC
include
)
target_link_libraries(${PROJECT_NAME}_map_builder_tests
${PROJECT_NAME}
Catch2::Catch2
)