jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
61 stars 47 forks source link

ROS 2 file generation macro #717

Closed olivier-stasse closed 1 month ago

olivier-stasse commented 1 month ago

This is a proposal to fix #716. This PR introduces a new file ros2.cmake. It provides a macro _install_project_ros2_ament_files to generate files for the ROS2 ament system. This macro is called in setup_project_finalize() in base.cmake. The generation works if the variable BUILDING_ROS2_PACKAGE is set (to TRUE for instance).

pre-commit was run over the PR. Tested against unittest.

olivier-stasse commented 1 month ago

Can you add this new ros2.cmake file in CMakeLists.txt ?

Done. Thanks for the review @nim65s !