Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Modern CMake practices #245

Open
2 of 9 tasks
RFRIEDM-Trimble opened this issue May 30, 2022 · 2 comments
Open
2 of 9 tasks

Support Modern CMake practices #245

RFRIEDM-Trimble opened this issue May 30, 2022 · 2 comments

Comments

@RFRIEDM-Trimble
Copy link
Contributor

RFRIEDM-Trimble commented May 30, 2022

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:

RFRIEDM-Trimble added a commit to RFRIEDM-Trimble/image_common that referenced this issue May 30, 2022
* Attempt fix for ros-perception#245

Signed-off-by: Ryan Friedman <[email protected]>
@clydemcqueen
Copy link

clydemcqueen commented Jun 1, 2022

  • 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

@RFRIEDM-Trimble
Copy link
Contributor Author

3.12.2

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants