ros-perception / image_common

Common code for working with images in ROS

Home Page:http://www.ros.org/wiki/image_common

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Modern CMake practices

RFRIEDM-Trimble opened this issue · comments

As a user of this library in gscam2, I'd like to consume the libraries in image_common with a modern cmake interface, but it's not supplied here.

Here's my proposal:

  • Replace calls to include_directories with target_include_directories
  • - Add ALIAS libraries for better determinism
  • - Replace calls to ament_target_dependencies with target_link_libraries
  • - Specify linkage type as PUBLIC, PRIVATE or INTERFACE when calling target_link_libraries
  • - Bump Minimum cmake for galactic to 3.12.2 and use some of the new features in it for installation
  • - Add an EXPORT set to the install commands
  • - Support a CONFIG mode export to support find_package allowing consumers to link to targets like camera_calibration_parsers::camera_calibration_parsers
  • - Remove ament_export_include_directories and ament_export_libraries calls as they are superfluous
  • - Could use ament_auto_package to handle the install of the targets

References:

  • Bump Minimum cmake for galactic to 3.16.3 and use some of the new features in it for installation

Hi, @RFRIEDM-Trimble -- the CMake versions are defined in REP2000, and would have to be updated there. Looks like the highest version supported by all recommended Galactic platforms is 3.12.2. For Humble it's 3.14.4. https://www.ros.org/reps/rep-2000.html

3.12.2

Got it. I'll bump to 3.12.2 and implement the proposal.