Skip to content

Commit

Permalink
Generate version header using ament_generate_version_header(..) (#1141)
Browse files Browse the repository at this point in the history
Signed-off-by: gavanderhoorn <[email protected]>
  • Loading branch information
gavanderhoorn committed Mar 28, 2024
1 parent c19dab5 commit 5766d5e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.5)
project(rcl)

find_package(ament_cmake_ros REQUIRED)
find_package(ament_cmake_gen_version_h REQUIRED)

find_package(libyaml_vendor REQUIRED)
find_package(rcl_interfaces REQUIRED)
Expand Down Expand Up @@ -147,6 +148,7 @@ ament_export_dependencies(rmw)
ament_export_dependencies(rmw_implementation)
ament_export_dependencies(rosidl_runtime_c)
ament_export_dependencies(type_description_interfaces)
ament_generate_version_header(${PROJECT_NAME})

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions rcl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<author email="[email protected]">Jacob Perron</author>

<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<build_export_depend>rmw</build_export_depend>

Expand Down
3 changes: 3 additions & 0 deletions rcl_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.5)
project(rcl_action)

find_package(ament_cmake_ros REQUIRED)
find_package(ament_cmake_gen_version_h REQUIRED)

find_package(action_msgs REQUIRED)
find_package(rcl REQUIRED)
Expand Down Expand Up @@ -223,4 +224,6 @@ ament_export_dependencies(rcl)
ament_export_dependencies(rmw)
ament_export_dependencies(rosidl_runtime_c)

ament_generate_version_header(${PROJECT_NAME})

ament_package()
1 change: 1 addition & 0 deletions rcl_action/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<author email="[email protected]">Jacob Perron</author>

<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<depend>action_msgs</depend>
<depend>rcl</depend>
Expand Down
3 changes: 3 additions & 0 deletions rcl_lifecycle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.5)
project(rcl_lifecycle)

find_package(ament_cmake_ros REQUIRED)
find_package(ament_cmake_gen_version_h REQUIRED)

find_package(lifecycle_msgs REQUIRED)
find_package(rcl REQUIRED)
Expand Down Expand Up @@ -134,6 +135,8 @@ ament_export_targets(${PROJECT_NAME})
ament_export_dependencies(lifecycle_msgs)
ament_export_dependencies(rcl)

ament_generate_version_header(${PROJECT_NAME})

ament_package()

install(
Expand Down
1 change: 1 addition & 0 deletions rcl_lifecycle/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<author email="[email protected]">Karsten Knese</author>

<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<build_depend>lifecycle_msgs</build_depend>
<build_depend>rcl</build_depend>
Expand Down
3 changes: 3 additions & 0 deletions rcl_yaml_param_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.5)
project(rcl_yaml_param_parser)

find_package(ament_cmake_ros REQUIRED)
find_package(ament_cmake_gen_version_h REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw REQUIRED)
find_package(libyaml_vendor REQUIRED)
Expand Down Expand Up @@ -210,6 +211,8 @@ ament_export_targets(${PROJECT_NAME})

ament_export_dependencies(ament_cmake rcutils)

ament_generate_version_header(${PROJECT_NAME})

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
Expand Down
1 change: 1 addition & 0 deletions rcl_yaml_param_parser/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<author email="[email protected]">Jacob Perron</author>

<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>

<depend>libyaml_vendor</depend>
<depend>rcutils</depend>
Expand Down

0 comments on commit 5766d5e

Please sign in to comment.