From a081c4835d34e8f7b6e9c7fff484017cededd654 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 21 Jul 2021 08:25:53 +1000 Subject: [PATCH] Update CMakeLists.txt --- rclpy/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rclpy/CMakeLists.txt b/rclpy/CMakeLists.txt index 351009c71..47d862e4c 100644 --- a/rclpy/CMakeLists.txt +++ b/rclpy/CMakeLists.txt @@ -126,10 +126,17 @@ add_library(rclpy_common SHARED ) target_link_libraries(rclpy_common PUBLIC pybind11::pybind11 - ${PYTHON_LIBRARIES} rcl::rcl rmw::rmw ) + +if(NOT APPLE) + target_link_libraries(rclpy_common ${PYTHON_LIBRARIES}) +else() + set_target_properties(rclpy_common PROPERTIES + LINK_FLAGS "-undefined dynamic_lookup") +endif() + target_include_directories(rclpy_common PUBLIC src/rclpy_common/include )