Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thread dependency to examples (Rolling) #237

Merged
merged 13 commits into from
Jan 25, 2022
1 change: 1 addition & 0 deletions rclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ find_package(rcl_action REQUIRED)
find_package(rcutils REQUIRED)
find_package(rosidl_generator_c REQUIRED)
find_package(std_msgs REQUIRED)
find_package(Threads REQUIRED)

if("${rcl_VERSION}" VERSION_LESS "1.0.0")
message(STATUS
Expand Down
3 changes: 3 additions & 0 deletions rclc_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ find_package(std_msgs REQUIRED)
find_package(lifecycle_msgs REQUIRED)
find_package(example_interfaces REQUIRED)
find_package(rclc_parameter REQUIRED)
find_package(Threads REQUIRED)

include_directories(include)

Expand Down Expand Up @@ -57,9 +58,11 @@ add_executable(example_pingpong src/example_pingpong.cpp)
ament_target_dependencies(example_pingpong rcl rclc std_msgs)

add_executable(example_action_server src/example_action_server.c)
target_link_libraries(example_action_server ${CMAKE_THREAD_LIBS_INIT})
ament_target_dependencies(example_action_server rcl rcl_action rclc example_interfaces)

add_executable(example_action_client src/example_action_client.c)
target_link_libraries(example_action_client ${CMAKE_THREAD_LIBS_INIT})
ament_target_dependencies(example_action_client rcl rcl_action rclc example_interfaces)

install(TARGETS
Expand Down
2 changes: 1 addition & 1 deletion rclc_lifecycle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_package(std_msgs REQUIRED)
find_package(lifecycle_msgs REQUIRED)
find_package(rcl_lifecycle REQUIRED)
find_package(rclc REQUIRED)

find_package(Threads REQUIRED)

if("${rcl_lifecycle_VERSION}" VERSION_LESS "1.0.0")
message(STATUS "Found rcl_lifecycle version ${rcl_lifecycle_VERSION}, which belongs to Eloquent or earlier")
Expand Down
1 change: 1 addition & 0 deletions rclc_parameter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ find_package(rcutils REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rcl_interfaces REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(Threads REQUIRED)

#################################################
# create library
Expand Down