-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
208 lines (147 loc) · 4.84 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
cmake_minimum_required(VERSION 3.5)
project(lidar_activation)
add_compile_options(-Wall -Wextra)
## Use C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(OpenCV_DIR /usr/lib/x86_64-linux-gnu/cmake/opencv4)
set(Boost_USE_STATIC_LIBS ON)
find_package(OpenCV REQUIRED)
find_package(Threads REQUIRED)
find_package(PCL 1.2 REQUIRED)
find_package(Boost REQUIRED COMPONENTS timer thread serialization chrono)
## Declare a cpp library
add_library(utils_core
src/Lidar_Utils/Lidar_Utils.cpp
)
target_compile_features(utils_core INTERFACE cxx_std_11)
## Declare a cpp library
add_library(lidar_tool_option_core
src/Lidar_Tool_Option/Lidar_Tool_Option.cpp
)
target_compile_features(lidar_tool_option_core INTERFACE cxx_std_11)
## Declare a cpp library
add_library(clustering_activation_core
src/Clustering_Activation/Clustering_Activation.cpp
)
target_compile_features(clustering_activation_core INTERFACE cxx_std_11)
## Add dependencies to exported targets, like ROS msgs or srvs
add_dependencies(clustering_activation_core
${OpenCV_LIBS}
)
## Specify libraries to link executable targets against
target_link_libraries(clustering_activation_core
${OpenCV_LIBS}
)
## Declare a cpp library
add_library(k_means_core
src/K_Means/K_Means.cpp
)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
target_compile_features(k_means_core INTERFACE cxx_std_11)
## Add dependencies to exported targets, like ROS msgs or srvs
add_dependencies(k_means_core
${OpenCV_LIBS}
)
## Specify libraries to link executable targets against
target_link_libraries(k_means_core
${OpenCV_LIBS}
${PCL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
## Declare a cpp library
add_library(euclidean_clustering_core
src/Euclidean_Clustering/Euclidean_Clustering.cpp
)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
target_compile_features(euclidean_clustering_core INTERFACE cxx_std_11)
## Add dependencies to exported targets, like ROS msgs or srvs
add_dependencies(euclidean_clustering_core
${OpenCV_LIBS}
)
## Specify libraries to link executable targets against
target_link_libraries(euclidean_clustering_core
${OpenCV_LIBS}
${PCL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
## Declare a cpp library
add_library(dbscan_clustering_core
src/DBscan_Clustering/DBscan_Clustering.cpp
)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
target_compile_features(dbscan_clustering_core INTERFACE cxx_std_11)
## Add dependencies to exported targets, like ROS msgs or srvs
add_dependencies(dbscan_clustering_core
${OpenCV_LIBS}
)
## Specify libraries to link executable targets against
target_link_libraries(dbscan_clustering_core
${OpenCV_LIBS}
${PCL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
## Declare a cpp library
add_library(clustering_visualization_core
src/Clustering_Visualization/Clustering_Visualization.cpp
)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
target_compile_features(clustering_visualization_core INTERFACE cxx_std_11)
## Add dependencies to exported targets, like ROS msgs or srvs
add_dependencies(clustering_visualization_core
${OpenCV_LIBS}
)
## Specify libraries to link executable targets against
target_link_libraries(clustering_visualization_core
${OpenCV_LIBS}
${PCL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
## Declare cpp executables
add_executable(main
src/main.cpp
src/Lidar_Utils/Lidar_Utils.cpp
src/Lidar_Tool_Option/Lidar_Tool_Option.cpp
src/Clustering_Activation/Clustering_Activation.cpp
src/K_Means/K_Means.cpp
src/Euclidean_Clustering/Euclidean_Clustering.cpp
src/DBscan_Clustering/DBscan_Clustering.cpp
src/Clustering_Visualization/Clustering_Visualization.cpp
)
target_compile_features(main INTERFACE cxx_std_11)
target_link_libraries(main
clustering_activation_core
utils_core
lidar_tool_option_core
k_means_core
${OpenCV_LIBS}
${CMAKE_THREAD_LIBS_INIT}
)