-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
173 lines (154 loc) · 3.86 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
cmake_minimum_required(VERSION 2.8.3)
project(ufo)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_STANDARD 17) # C++17 to use stdc++fs
# set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -pthread")
find_package(catkin REQUIRED COMPONENTS
tf
roscpp
rospy
cv_bridge
# pcl library
pcl_conversions
# msgs
std_msgs
sensor_msgs
geometry_msgs
nav_msgs
message_generation
image_transport
)
find_package(OpenMP REQUIRED)
find_package(PCL 1.8 REQUIRED QUIET)
find_package(OpenCV REQUIRED QUIET)
find_package(yaml-cpp REQUIRED QUIET)
set(YAML_CPP_LIBRARIES yaml-cpp)
# find_package(GTSAM REQUIRED QUIET)
# add_message_files(
# DIRECTORY msg
# FILES
# ssc_info.msg
# )
# generate_messages(
# DEPENDENCIES
# geometry_msgs
# std_msgs
# nav_msgs
# sensor_msgs
# )
catkin_package(
INCLUDE_DIRS include
DEPENDS PCL
# GTSAM
CATKIN_DEPENDS
std_msgs
nav_msgs
geometry_msgs
sensor_msgs
message_runtime
message_generation
)
# include directories
include_directories(
include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
# ${GTSAM_INCLUDE_DIR}
)
# link directories
link_directories(
include
${PCL_LIBRARY_DIRS}
${OpenCV_LIBRARY_DIRS}
# ${GTSAM_LIBRARY_DIRS}
)
###########
## Build ##
###########
# main
add_executable( ${PROJECT_NAME}_ufo src/main.cpp
src/ssc.cpp
)
add_dependencies(${PROJECT_NAME}_ufo ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_ufo PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_ufo
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# evaluate
add_executable( ${PROJECT_NAME}_evaluate src/evaluate.cpp)
add_dependencies(${PROJECT_NAME}_evaluate ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_evaluate PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_evaluate
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# remain
add_executable( ${PROJECT_NAME}_remain src/plotStatic.cpp)
add_dependencies(${PROJECT_NAME}_remain ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_remain PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_remain
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# plotObject
add_executable( ${PROJECT_NAME}_object src/plotObject.cpp)
add_dependencies(${PROJECT_NAME}_object ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_object PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_object
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# makeScan
add_executable( ${PROJECT_NAME}_scan src/makeScan.cpp)
add_dependencies(${PROJECT_NAME}_scan ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_scan PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_scan
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# colorBin
add_executable( ${PROJECT_NAME}_color src/colorBin.cpp)
add_dependencies(${PROJECT_NAME}_color ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_color PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_color
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)
# erasor dynamic
add_executable( ${PROJECT_NAME}_erasor src/erasor_dynamic.cpp)
add_dependencies(${PROJECT_NAME}_erasor ${catkin_EXPORTED_TARGETS})
target_compile_options(${PROJECT_NAME}_erasor PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME}_erasor
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES}
${OpenMP_CXX_FLAGS}
${YAML_CPP_LIBRARIES}
stdc++fs
)