@@ -11,54 +11,54 @@ find_package(btcpp_ros2_interfaces REQUIRED)
11
11
find_package (std_msgs REQUIRED)
12
12
find_package (std_srvs REQUIRED)
13
13
14
- set (THIS_PACKAGE_DEPS
15
- behaviortree_ros2
16
- std_msgs
17
- std_srvs
18
- btcpp_ros2_interfaces )
14
+ set (THIS_PACKAGE_AMENT_TARGETS
15
+ behaviortree_ros2::behaviortree_ros2
16
+ ${std_msgs_TARGETS}
17
+ ${std_srvs_TARGETS}
18
+ ${btcpp_ros2_interfaces_TARGETS} )
19
19
20
20
######################################################
21
21
# Simple example showing how to use and customize the BtExecutionServer
22
22
add_executable (sample_bt_executor src/sample_bt_executor.cpp)
23
- ament_target_dependencies (sample_bt_executor ${THIS_PACKAGE_DEPS } )
23
+ target_link_libraries (sample_bt_executor ${THIS_PACKAGE_AMENT_TARGETS } )
24
24
25
25
######################################################
26
26
# Build an Action Client that calls the sleep action (STATIC version)
27
27
28
28
add_executable (sleep_client
29
29
src/sleep_action.cpp
30
30
src/sleep_client.cpp)
31
- ament_target_dependencies (sleep_client ${THIS_PACKAGE_DEPS } )
31
+ target_link_libraries (sleep_client ${THIS_PACKAGE_AMENT_TARGETS } )
32
32
33
33
######################################################
34
34
# Build a client that call the sleep action (Plugin version)
35
35
36
36
add_library (sleep_plugin SHARED src/sleep_action.cpp)
37
37
target_compile_definitions (sleep_plugin PRIVATE BT_PLUGIN_EXPORT )
38
- ament_target_dependencies (sleep_plugin ${THIS_PACKAGE_DEPS } )
38
+ target_link_libraries (sleep_plugin ${THIS_PACKAGE_AMENT_TARGETS } )
39
39
40
40
add_executable (sleep_client_dyn src/sleep_client.cpp)
41
41
target_compile_definitions (sleep_client_dyn PRIVATE USE_SLEEP_PLUGIN )
42
42
target_link_libraries (sleep_client_dyn sleep_plugin )
43
- ament_target_dependencies (sleep_client_dyn ${THIS_PACKAGE_DEPS } )
43
+ target_link_libraries (sleep_client_dyn ${THIS_PACKAGE_AMENT_TARGETS } )
44
44
45
45
######################################################
46
46
# Build Server
47
47
add_executable (sleep_server src/sleep_server.cpp)
48
- ament_target_dependencies (sleep_server ${THIS_PACKAGE_DEPS } )
48
+ target_link_libraries (sleep_server ${THIS_PACKAGE_AMENT_TARGETS } )
49
49
50
50
######################################################
51
51
# Build subscriber_test
52
52
add_executable (subscriber_test src/subscriber_test.cpp)
53
- ament_target_dependencies (subscriber_test ${THIS_PACKAGE_DEPS } )
53
+ target_link_libraries (subscriber_test ${THIS_PACKAGE_AMENT_TARGETS } )
54
54
55
55
######################################################
56
56
# the SetBool test
57
57
add_executable (bool_client src/bool_client.cpp src/set_bool_node.cpp)
58
- ament_target_dependencies (bool_client ${THIS_PACKAGE_DEPS } )
58
+ target_link_libraries (bool_client ${THIS_PACKAGE_AMENT_TARGETS } )
59
59
60
60
add_executable (bool_server src/bool_server.cpp )
61
- ament_target_dependencies (bool_server ${THIS_PACKAGE_DEPS } )
61
+ target_link_libraries (bool_server ${THIS_PACKAGE_AMENT_TARGETS } )
62
62
63
63
######################################################
64
64
# INSTALL
0 commit comments