From 05e6b96847cbc4601194a117e00298dfb33563c6 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 1 Jul 2020 13:22:33 -0700 Subject: [PATCH] link against thread library where necessary (#1210) Signed-off-by: Dirk Thomas --- rclcpp/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rclcpp/CMakeLists.txt b/rclcpp/CMakeLists.txt index 8230400b77..26d7e69362 100644 --- a/rclcpp/CMakeLists.txt +++ b/rclcpp/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.5) project(rclcpp) +find_package(Threads REQUIRED) + find_package(ament_cmake_ros REQUIRED) find_package(builtin_interfaces REQUIRED) find_package(libstatistics_collector REQUIRED) @@ -170,6 +172,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC "$" "$" "$") +target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT}) # specific order: dependents before dependencies ament_target_dependencies(${PROJECT_NAME} "libstatistics_collector"