-
Notifications
You must be signed in to change notification settings - Fork 208
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
Use CMAKE_STAGING_PREFIX for staging OGRE installation #861
Conversation
To maintain build/install phasing correctly, this vendor package is installing the external project to a staging location, which is then recursively copied to the final location during the vendor package's installation phase. The mechanism by which we're currently telling the external project where to install to gives it the impression that that will be the final destination, and it embeds such paths in places like pkgconfig files. The CMAKE_STAGING_PREFIX can be used to override all of the `install()` operations' targets while still telling the project where it will eventually end up, which is pretty much exactly what we're trying to do. Signed-off-by: Scott K Logan <logans@cottsay.net>
${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor | ||
opt/rviz_ogre_vendor |
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.
This part of the change is actually intended to accomplish the (sort of) opposite - to support CMAKE_STAGING_PREFIX
during build of the vendor package itself. That isn't something we're currently trying to do, but it seems appropriate to not needlessly exclude that scenario given that we're relying on it functioning correctly here.
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 with green CI
Since the docs said it was for cross-compiling I initially wondered if CMAKE_STAGING_PREFIX
would only do something if CMAKE_CROSSCOMPILING
was set, but looking at the commit that added it it appears to always do something.
I built and ran RViz2 locally. I no longer see build directory paths in the pkg-config files.
@Mergifyio backport humble |
To maintain build/install phasing correctly, this vendor package is installing the external project to a staging location, which is then recursively copied to the final location during the vendor package's installation phase. The mechanism by which we're currently telling the external project where to install to gives it the impression that that will be the final destination, and it embeds such paths in places like pkgconfig files. The CMAKE_STAGING_PREFIX can be used to override all of the `install()` operations' targets while still telling the project where it will eventually end up, which is pretty much exactly what we're trying to do. Signed-off-by: Scott K Logan <logans@cottsay.net> (cherry picked from commit 47e91ee)
✅ Backports have been created
|
To maintain build/install phasing correctly, this vendor package is installing the external project to a staging location, which is then
recursively copied to the final location during the vendor package's installation phase.
The mechanism by which we're currently telling the external project where to install to gives it the impression that that will be the final destination, and it embeds such paths in places like pkgconfig files.
The CMAKE_STAGING_PREFIX can be used to override all of the
install()
operations' targets while still telling the project where it will eventually end up, which is pretty much exactly what we're trying to do.We should consider making this change in other vendor packages, but I'm trying it here first because the
*.pc
files it installs contain paths to thebuild
directory and are currently useless (at best).