forked from ncnynl/razor_imu_m0_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
78 lines (63 loc) · 1.87 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
cmake_minimum_required(VERSION 2.8.3)
project(razor_imu_m0_driver)
## Add support for C++11, supported in ROS Kinetic and newer
#add_definitions(-std=c++11)
find_package(Boost REQUIRED COMPONENTS regex)
find_package(catkin REQUIRED COMPONENTS
nodelet
pluginlib
roscpp
sensor_msgs
serial
)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS nodelet pluginlib roscpp sensor_msgs serial
)
###########
## Build ##
###########
include_directories(
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
# node executable
add_executable(factory_firmware_driver_node
src/factory_firmware_driver.cpp
src/factory_firmware_driver_node.cpp)
add_dependencies(factory_firmware_driver_node ${catkin_EXPORTED_TARGETS})
target_link_libraries(factory_firmware_driver_node
${catkin_LIBRARIES}
)
# nodelet library
add_library(razor_imu_m0_driver_factory_firmware_driver_nodelet
src/factory_firmware_driver.cpp
src/factory_firmware_driver_nodelet.cpp)
add_dependencies(razor_imu_m0_driver_factory_firmware_driver_nodelet ${catkin_EXPORTED_TARGETS})
target_link_libraries(razor_imu_m0_driver_factory_firmware_driver_nodelet
${catkin_LIBRARIES}
)
#############
## Install ##
#############
install(TARGETS factory_firmware_driver_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(TARGETS razor_imu_m0_driver_factory_firmware_driver_nodelet
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(PROGRAMS scripts/create_udev_rules
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES nodelet_plugin.xml
razor_imu_m0_driver.rules
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
#############
## Testing ##
#############
# TODO