-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
116 lines (84 loc) · 2.13 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
107
108
109
110
111
112
113
114
115
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(tiago_controller)
option(TIAGO_MSGS_ONLY "Build only the messages" OFF)
if (${TIAGO_MSGS_ONLY} STREQUAL "ON")
message("tiago_controller: building only the messages")
find_package(catkin REQUIRED COMPONENTS
std_msgs
message_generation
std_srvs
geometry_msgs
)
add_service_files(
FILES
move.srv
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
else()
find_package(inria_wbc REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
hardware_interface
pluginlib
controller_interface
message_generation
std_srvs
geometry_msgs
)
add_service_files(
FILES
move.srv
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(CATKIN_DEPENDS
roscpp
std_msgs
std_srvs
hardware_interface
pluginlib
controller_interface
message_runtime
geometry_msgs
)
add_library(tiago_joint_controller SHARED
src/joint_controller.cpp # ros_control controller (using inria_wbc)
src/behavior_move.cpp # inria_wbc behavior
)
target_compile_options(tiago_joint_controller PRIVATE -Wno-shadow)
target_compile_features(tiago_joint_controller PUBLIC cxx_std_11)
target_link_options(tiago_joint_controller PRIVATE "LINKER:--no-as-needed")
target_include_directories(tiago_joint_controller
PUBLIC
${catkin_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(tiago_joint_controller
PUBLIC
${catkin_LIBRARIES}
inria_wbc::inria_wbc
)
SET_TARGET_PROPERTIES(tiago_joint_controller PROPERTIES LINK_FLAGS -Wl,-no-as-needed)
install(TARGETS tiago_joint_controller
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES controller_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY include/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/include)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config)
endif()