-
Notifications
You must be signed in to change notification settings - Fork 34
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
Normalize header install path #467
Conversation
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
The "meta" header containing a list of all includes in the package is currently installed one folder above the other includes. This cleans up the definition of that install path by normalizing it to fix a cmake warning and also renaming some variables for clarity. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
testing with gz-physics8 using gazebo-tooling/gazebodistro@5f23dec: |
We also need to make sure that we don't break packaging on the ROS side for the vendor packages. Namely, we need to ensure that no absolute install paths are used. We can check if the following fails on a downstream library
|
cmake/GzInstallAllHeaders.cmake
Outdated
set(meta_header_install_dir ${GZ_INCLUDE_INSTALL_DIR_FULL}/${PROJECT_INCLUDE_DIR}/${component_name}) | ||
# Define the install directory for the "config" header | ||
# The "meta" header will be installed one folder above this | ||
set(config_header_install_dir ${GZ_INCLUDE_INSTALL_DIR_FULL}/${PROJECT_INCLUDE_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I messed up on this line, will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
running again with fix in bb9f35f |
I built this branch with gz-math8 in a colcon workspace and ran your suggested command in the build/gz-math8 folder and it worked in that specific case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'll merge this now so it can be included in the next ubuntu nightly build of gz-cmake4, and we can watch the |
I think this change requires some porting to other branches. The warnings are appearing on all gz-plugin-homebrew jobs:
Also, do you know why this change didn't solve the warning in gz-plugin3? Cc: @scpeters |
the change may need to be slightly different since the |
a new release is needed of this package for CI jobs that use released binaries (Ubuntu and macOS homebrew)
If we don't see any breakages on the main branches, which use nightly builds, then I'll make a prerelease, so we can see the results on macOS homebrew |
|
https://github.com/Mergifyio backport gz-cmake3 |
✅ Backports have been created
|
The "meta" header containing a list of all includes in the package is currently installed one folder above the other includes. This cleans up the definition of that install path by normalizing it to fix a cmake warning and also renaming some variables for clarity. Signed-off-by: Steve Peters <scpeters@openrobotics.org> (cherry picked from commit 5b556fb)
The "meta" header containing a list of all includes in the package is currently installed one folder above the other includes. This cleans up the definition of that install path by normalizing it to fix a cmake warning and also renaming some variables for clarity. Signed-off-by: Steve Peters <scpeters@openrobotics.org> (cherry picked from commit 5b556fb)
🦟 Bug fix
Fixes #461
Summary
The "meta" header file that contains includes of all other core / component header files is installed to a relative path, one folder above the other include files. This was causing a cmake warning that the path wasn't normalized. This PR normalizes that path variable to fix the warning. It also renames some variables from
master_*
tometa_*
(6bd2d3d) for consistency and improved language and defines distinct variables for theconfig_header_install_dir
andmeta_header_install_dir
(part of d32068d) to clarify what each variable represents, since the "meta" header previously wasn't actually installed tometa_header_install_dir
.This should be tested with downstream packages, including
gz-plugin
(to confirm the cmake warning is fixed) andsdformat
(which uses theREPLACE_INCLUDE_PATH
option).Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.