diff --git a/rclcpp_components/cmake/rclcpp_components_register_node.cmake b/rclcpp_components/cmake/rclcpp_components_register_node.cmake index a2691a002e..4abc511759 100644 --- a/rclcpp_components/cmake/rclcpp_components_register_node.cmake +++ b/rclcpp_components/cmake/rclcpp_components_register_node.cmake @@ -37,11 +37,13 @@ macro(rclcpp_components_register_node target) set(component ${ARGS_PLUGIN}) set(node ${ARGS_EXECUTABLE}) _rclcpp_components_register_package_hook() + set(_path "lib") if(WIN32) set(_path "bin") set(LIBRARY_NAME ${target}.dll) + elseif(APPLE) + set(LIBRARY_NAME lib${target}.dylib) else() - set(_path "lib") set(LIBRARY_NAME lib${target}.so) endif() set(_RCLCPP_COMPONENTS__NODES