-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathCMakeLists.txt
125 lines (107 loc) · 2.73 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
project(yeti)
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -Wno-unused-parameter -O2")
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(OMP_NUM_THREADS 8)
find_package(OpenCV 3 REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED COMPONENTS
system
filesystem
)
find_package(PkgConfig)
find_package(PythonLibs REQUIRED)
include_directories(
include
third_party/matplotlib-cpp
third_party/nanoflann
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIR}
)
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
endforeach()
add_library(features
src/features.cpp
)
target_link_libraries(features
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_INCLUDE_DIRS}
Eigen3::Eigen
)
add_library(radar_utils
src/radar_utils.cpp
)
target_link_libraries(radar_utils
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_INCLUDE_DIRS}
Eigen3::Eigen
)
add_library(association
src/association.cpp
)
target_link_libraries(association
${catkin_LIBRARIES}
${Boost_INCLUDE_DIRS}
Eigen3::Eigen
)
add_executable(visualization src/visualization.cpp)
target_link_libraries(visualization
features
radar_utils
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_INCLUDE_DIRS}
)
add_executable(odometry src/odometry.cpp)
target_link_libraries(odometry
features
radar_utils
association
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_library(matplotlibcpp INTERFACE)
target_include_directories(matplotlibcpp INTERFACE include)
target_include_directories(matplotlibcpp INTERFACE ${PYTHON_INCLUDE_DIRS})
target_link_libraries(matplotlibcpp INTERFACE ${PYTHON_LIBRARIES})
add_executable(test_motiondistortion src/test_motiondistortion.cpp)
target_link_libraries(test_motiondistortion
association
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
matplotlibcpp
)
target_compile_definitions(test_motiondistortion PRIVATE "-DWITHOUT_NUMPY")
add_executable(showcase_distortion src/showcase_distortion.cpp)
target_link_libraries(showcase_distortion
features
radar_utils
association
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
matplotlibcpp
)
target_compile_definitions(showcase_distortion PRIVATE "-DWITHOUT_NUMPY")
add_executable(localization src/localization.cpp)
target_link_libraries(localization
features
radar_utils
association
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(save_cartesians src/save_cartesians.cpp)
target_link_libraries(save_cartesians
radar_utils
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)