Skip to content

Commit

Permalink
Generate version header using ament_generate_version_header(..) (ba…
Browse files Browse the repository at this point in the history
…ckport ros2#1141) (ros2#1144)

* Generate version header using ament_generate_version_header(..) (ros2#1141)

Signed-off-by: gavanderhoorn <g.a.vanderhoorn@tudelft.nl>
(cherry picked from commit 5766d5e)

# Conflicts:
#	rcl_action/CMakeLists.txt
#	rcl_lifecycle/CMakeLists.txt

* resolve conflicts.

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>

---------

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Co-authored-by: G.A. vd. Hoorn <g.a.vanderhoorn@tudelft.nl>
Co-authored-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
  • Loading branch information
3 people authored May 26, 2024
1 parent f01409f commit 900d7f5
Show file tree
Hide file tree
Showing 8 changed files with 17 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="jacob@openrobotics.org">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
4 changes: 4 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 @@ -228,4 +229,7 @@ ament_export_dependencies(rcl)
ament_export_dependencies(rcutils)
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="jacob@openrobotics.org">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
4 changes: 4 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 @@ -140,6 +141,9 @@ ament_export_dependencies(rcl)
ament_export_dependencies(rcutils)
ament_export_dependencies(rosidl_runtime_c)
ament_export_dependencies(tracetools)

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="karsten@openrobotics.org">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 @@ -211,6 +212,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="jacob@openrobotics.org">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 900d7f5

Please sign in to comment.