Skip to content

Commit

Permalink
generate version.h file per package using the ament_generate_version_…
Browse files Browse the repository at this point in the history
…header (backport #1449) (#1938)
  • Loading branch information
mergify[bot] authored Dec 13, 2024
1 parent 8164fc5 commit 5bce7bf
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions controller_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ ament_export_libraries(
${PROJECT_NAME}
)
ament_package()
ament_generate_version_header(${PROJECT_NAME})
1 change: 1 addition & 0 deletions controller_interface/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<build_depend>hardware_interface</build_depend>
<build_depend>rclcpp_lifecycle</build_depend>
Expand Down
1 change: 1 addition & 0 deletions controller_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,4 @@ ament_export_dependencies(
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
ament_package()
ament_generate_version_header(${PROJECT_NAME})
1 change: 1 addition & 0 deletions controller_manager/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<depend>ament_index_cpp</depend>
Expand Down
1 change: 1 addition & 0 deletions hardware_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,4 @@ ament_export_libraries(
)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()
ament_generate_version_header(${PROJECT_NAME})
1 change: 1 addition & 0 deletions hardware_interface/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<depend>control_msgs</depend>
<depend>lifecycle_msgs</depend>
Expand Down
22 changes: 22 additions & 0 deletions joint_limits/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)

add_library(joint_limits INTERFACE)
target_compile_features(joint_limits INTERFACE cxx_std_17)
target_include_directories(joint_limits INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/joint_limits>
)
ament_target_dependencies(joint_limits INTERFACE ${THIS_PACKAGE_INCLUDE_DEPENDS})

install(DIRECTORY include/
DESTINATION include
)
Expand Down Expand Up @@ -45,12 +53,26 @@ if(BUILD_TESTING)

endif()

install(
DIRECTORY include/
DESTINATION include/joint_limits
)
install(TARGETS joint_limits
EXPORT export_joint_limits
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

ament_export_targets(export_joint_limits HAS_LIBRARY_TARGET)
ament_export_dependencies(
rclcpp
rclcpp_lifecycle
)

ament_export_include_directories(
include
)

ament_package()
ament_generate_version_header(${PROJECT_NAME})
1 change: 1 addition & 0 deletions joint_limits/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<url type="repository">https://github.com/ros-controls/ros2_control</url>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<depend>rclcpp</depend>
<depend>rclcpp_lifecycle</depend>
Expand Down
1 change: 1 addition & 0 deletions transmission_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ ament_export_libraries(
)

ament_package()
ament_generate_version_header(${PROJECT_NAME})
1 change: 1 addition & 0 deletions transmission_interface/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<depend>hardware_interface</depend>
<depend>pluginlib</depend>
Expand Down

0 comments on commit 5bce7bf

Please sign in to comment.