-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (54 loc) · 2.17 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
cmake_minimum_required(VERSION 2.8.3)
project(ax2550)
find_package(catkin REQUIRED
COMPONENTS
geometry_msgs
nav_msgs
roscpp
serial
serial_utils
tf
)
find_package(Boost REQUIRED COMPONENTS system thread)
add_message_files(
FILES
Encoders.msg
StampedEncoders.msg
)
generate_messages(DEPENDENCIES geometry_msgs nav_msgs)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ax2550
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp serial serial_utils tf
)
include_directories(include ${catkin_INCLUDE_DIRS})
## ax2550 ROS agnostic library
add_library(ax2550 src/ax2550.cc)
target_link_libraries(ax2550 ${serial_LIBRARIES} ${serial_utils_LIBRARIES} ${Boost_LIBRARIES})
## ax2550 ROS Node
add_executable(ax2550_node src/ax2550_node.cc)
target_link_libraries(ax2550_node ax2550 ${catkin_LIBRARIES})
add_dependencies(ax2550_node ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
## ax2550 Front ROS Node
add_executable(ax2550_node_front src/ax2550_node_front.cc)
target_link_libraries(ax2550_node_front ax2550 ${catkin_LIBRARIES})
add_dependencies(ax2550_node_front ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
## ax2550 Rear ROS Node
add_executable(ax2550_node_rear src/ax2550_node_rear.cc)
target_link_libraries(ax2550_node_rear ax2550 ${catkin_LIBRARIES})
add_dependencies(ax2550_node_rear ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
## ax2550 Omnidirectional Velocity ROS Node
add_executable(omni_cmd_vel src/omni_cmd_vel.cpp)
target_link_libraries(omni_cmd_vel ax2550 ${catkin_LIBRARIES})
add_dependencies(omni_cmd_vel ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
## ax2550 Omnidirectional Odometry ROS Node
add_executable(omni_odom src/omni_odom.cpp)
target_link_libraries(omni_odom ax2550 ${catkin_LIBRARIES})
add_dependencies(omni_odom ax2550_generate_messages_cpp ${catkin_EXPORTED_LIBRARIES})
install(TARGETS ax2550 ax2550_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h")