Skip to content

Commit

Permalink
Remove absolute path from installed CMake code (#948)
Browse files Browse the repository at this point in the history
Otherwise, rclcpp_components_register_node() fails if used from a fat archive.

Related to ros2/ros2#606.

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron authored Dec 17, 2019
1 parent afbdfc1 commit 0c66d0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rclcpp_components/rclcpp_components-extras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ macro(_rclcpp_components_register_package_hook)
endif()
endmacro()

set(@PROJECT_NAME@_NODE_TEMPLATE "@CMAKE_INSTALL_PREFIX@/@node_main_template_install_dir@/node_main.cpp.in")
get_filename_component(@PROJECT_NAME@_SHARE_DIR "${@PROJECT_NAME@_DIR}" DIRECTORY)
set(@PROJECT_NAME@_NODE_TEMPLATE "${@PROJECT_NAME@_SHARE_DIR}/node_main.cpp.in")

include("${rclcpp_components_DIR}/rclcpp_components_register_nodes.cmake")
include("${rclcpp_components_DIR}/rclcpp_components_register_node.cmake")

1 comment on commit 0c66d0c

@amber6623

This comment was marked as spam.

Please sign in to comment.