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

Feature request: allow packages to append to CMAKE_MODULE_PATH from their cmake config file #331

Closed
scpeters opened this issue Dec 21, 2022 · 1 comment · Fixed by #345
Closed
Assignees
Labels
enhancement New feature or request

Comments

@scpeters
Copy link
Member

scpeters commented Dec 21, 2022

Desired behavior

gz-cmake3 installs many cmake files and adds the containing folder to the CMAKE_MODULE_PATH so that packages that find_package(gz-cmake3) will be able to use those cmake files.

We would like to install cmake files from other packages as well (such as gz-physics) and append the path of the installed folder to the CMAKE_MODULE_PATH. We could expose this functionality as a flag or parameter to the gz_create_core_library and gz_add_component cmake functions, since that is where the cmake config templates are instantiated.

Alternatives considered

Unconditionally add a specific path for each package to the CMAKE_MODULE_PATH so it doesn't have to be configured. This may pollute the CMAKE_MODULE_PATH, so it would be cleaner to opt in to the functionality.

Implementation suggestion

Additional context

@scpeters scpeters added the enhancement New feature or request label Dec 21, 2022
@mjcarroll mjcarroll self-assigned this Apr 19, 2023
@mjcarroll
Copy link
Contributor

I'm going to go ahead and take this on as part of gazebosim/gz-msgs#113.

I think rather than appending to the CMAKE_MODULE_PATH, I may take the approach that ament does and allow the user to generate a gz-package<VER>-extras.cmake file that can provide hooks into other installed cmake files.

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

Successfully merging a pull request may close this issue.

2 participants