-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ensure relocatable config files #419
Conversation
Codecov Report
@@ Coverage Diff @@
## master #419 +/- ##
=======================================
Coverage 87.40% 87.40%
=======================================
Files 60 60
Lines 9351 9351
=======================================
Hits 8173 8173
Misses 1178 1178 Continue to review full report at Codecov.
|
If you are interested in fully relocatable .pc files, you can always get the (relocatable) location of the |
…onan Signed-off-by: Stefan Profanter <[email protected]>
51f143a
to
44962b5
Compare
Thanks @traversaro, I changed it now to |
cmake/sdformat_pc.in
Outdated
@@ -1,4 +1,4 @@ | |||
prefix="@CMAKE_INSTALL_PREFIX@" | |||
prefix=${pcfiledir}/../.. |
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.
as discussed in dartsim/dart#1527 (comment), this relative path is incorrect on Ubuntu
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.
based on a tip from @jslee02 in dartsim/dart#1529, I've updated this in 41ac64a to compute the relative path to the pkgconfig folder in cmake
This accounts for arch-dependent lib folders. Signed-off-by: Steve Peters <[email protected]>
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 think it looks good now, but maybe someone else wants to take a look since I've pushed to this branch? @j-rivero ?
* fix: Use PACKAGE_PREFIX_DIR to ensure relocatable CMake install for conan Signed-off-by: Stefan Profanter <[email protected]> * Compute relative path for pkgconfig folder. This accounts for arch-dependent lib folders. Signed-off-by: Steve Peters <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Jose Luis Rivero <[email protected]>
* fix: Use PACKAGE_PREFIX_DIR to ensure relocatable CMake install for conan Signed-off-by: Stefan Profanter <[email protected]> * Compute relative path for pkgconfig folder. This accounts for arch-dependent lib folders. Signed-off-by: Steve Peters <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Jose Luis Rivero <[email protected]>
Using CMAKE_INSTALL_PREFIX causes build issues when you relocate the installed CMake package, i.e., as it is done in conan.
CMAKE_INSTALL_PREFIX should not be used in the cmake.in files directly. The
@PACKAGE_INIT@
macro initializesPACKAGE_PREFIX_DIR
correspondingly.See also:
gazebosim/gz-tools#30
gazebosim/gz-cmake#129
gazebosim/gazebo-classic#2782
cc @stefanbuettner