-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
executable file
·102 lines (85 loc) · 2.72 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
cmake_minimum_required(VERSION 2.8.3)
project(smartbase_radar)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
find_package(Eigen3 REQUIRED)
## Generate messages in the 'msg' folder
add_message_files(
FILES
RadarTarget.msg
RadarTargetArray.msg
RadarTrack.msg
RadarTrackArray.msg
TCPFrame.msg
Vector2.msg
VehicleInfo.msg
srr2/AlignmentInfoSRR2.msg
srr2/VehicleInfoSRR2.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
LIBRARIES smartbase_radar
CATKIN_DEPENDS roscpp rospy std_msgs
DEPENDS system_lib
)
###########
## Build ##
###########
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)
add_library(kalman_filter src/kalman_filter.cpp)
target_link_libraries(kalman_filter ${catkin_LIBRARIES})
add_dependencies(kalman_filter ${PROJECT_NAME}_generate_messages_cpp)
add_executable(kalman_test src/kalman_test.cpp)
target_link_libraries(kalman_test
kalman_filter ${catkin_LIBRARIES})
add_library(slam_sys src/slam_sys.cpp)
target_link_libraries(slam_sys ${catkin_LIBRARIES})
add_dependencies(slam_sys radar_data ${PROJECT_NAME}_generate_messages_cpp)
add_library(radar_data src/kalman_filter.cpp)
target_link_libraries(radar_data ${catkin_LIBRARIES})
add_dependencies(radar_data ${PROJECT_NAME}_generate_messages_cpp)
add_executable(main src/main.cpp)
target_link_libraries(main
slam_sys
radar_data
${catkin_LIBRARIES})
#############
## Install ##
#############
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# install(TARGETS ${PROJECT_NAME}
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )
find_package(OpenCV)
include_directories(${OpenCV_INCLUDE_DIRS})