-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
106 lines (88 loc) · 2.09 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
103
104
105
106
cmake_minimum_required(VERSION 2.8.3)
project(premaidai_controller)
add_definitions(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
geometry_msgs
trajectory_msgs
control_msgs
controller_manager
message_generation
controller_manager
)
find_package(Boost REQUIRED COMPONENTS thread)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
catkin_python_setup()
## Generate services in the 'srv' folder
add_service_files(
FILES
MotionRequest.srv
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
sensor_msgs
)
include_directories(
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
add_library(premaidai_controller
src/command.cc
src/serial_port.cc
src/ros_bridge.cc
src/robot.cc
)
target_link_libraries(premaidai_controller
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(premaidai_controller_node
src/ros_bridge_node.cc
)
add_dependencies(premaidai_controller_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
)
target_link_libraries(premaidai_controller_node
premaidai_controller
${catkin_LIBRARIES}
)
add_executable(premaidai_driver_node
src/robot.cc
src/ros_hw_interface_node.cc
)
add_dependencies(premaidai_driver_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
)
target_link_libraries(premaidai_driver_node
premaidai_controller
${catkin_LIBRARIES}
)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
# LIBRARIES premaidai_bridge
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)
#############
## Install ##
#############
install(PROGRAMS
scripts/bridge_node.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY
launch
config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)