-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (41 loc) · 1.96 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
cmake_minimum_required(VERSION 2.8.3)
project(vesc_driver)
find_package(catkin REQUIRED COMPONENTS nodelet pluginlib roscpp std_msgs serial message_generation)
####################
## Build messages ##
####################
add_message_files(DIRECTORY msg FILES VescStateStamped.msg VescFeedbackStamped.msg)
generate_messages(DEPENDENCIES std_msgs)
catkin_package(INCLUDE_DIRS include CATKIN_DEPENDS nodelet pluginlib roscpp std_msgs serial message_runtime)
############################
## Build node and nodelet ##
############################
include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} )
# node executable
add_executable(vesc_driver_node src/vesc_driver_node.cpp
src/vesc_driver.cpp
src/vesc_interface.cpp
src/vesc_packet.cpp
src/vesc_packet_factory.cpp)
add_dependencies(vesc_driver_node ${catkin_EXPORTED_TARGETS})
target_link_libraries(vesc_driver_node ${catkin_LIBRARIES})
# nodelet library
add_library(vesc_driver_nodelet src/vesc_driver_nodelet.cpp
src/vesc_driver.cpp
src/vesc_interface.cpp
src/vesc_packet.cpp
src/vesc_packet_factory.cpp)
add_dependencies(vesc_driver_nodelet ${catkin_EXPORTED_TARGETS})
target_link_libraries(vesc_driver_nodelet ${catkin_LIBRARIES})
#############
## Install ##
#############
install(TARGETS vesc_driver_node RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS vesc_driver_nodelet LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES vesc_driver_nodelet.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
#############
## Testing ##
#############
# TODO