-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
57 lines (43 loc) · 1.23 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
cmake_minimum_required(VERSION 3.0.2)
project(mav_imu)
add_compile_options(-std=c++17 -w)
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
lpp
)
find_package(roscpp)
catkin_package(
INCLUDE_DIRS
CATKIN_DEPENDS
roscpp
lpp
)
include_directories(
include
lib/BMI08x-Sensor-API
${catkin_INCLUDE_DIRS})
add_library(${PROJECT_NAME}
src/spi_driver.cpp
src/imu_node.cpp
src/imu/adis16448.cpp
src/imu/bmi088.cpp
src/imu/ImuFactory.cpp)
# Bosch API
add_library(${PROJECT_NAME}_BMI08x
lib/BMI08x-Sensor-API/bmi08a.c
lib/BMI08x-Sensor-API/bmi08g.c
lib/BMI08x-Sensor-API/bmi08xa.c)
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_BMI08x)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
add_executable(${PROJECT_NAME}_node
src/main.cpp
)
target_compile_definitions(${PROJECT_NAME} PUBLIC MODE_ROSLOG) # Log++
target_link_libraries(${PROJECT_NAME}_node ${PROJECT_NAME})
catkin_add_gtest(${PROJECT_NAME}_test
test/test_entry_point.cc
test/test_vec3.cc
test/test_adis16448.cc
)
target_link_libraries(${PROJECT_NAME}_test ${PROJECT_NAME})