-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fix Nix pkg-config support #374
base: master
Are you sure you want to change the base?
Conversation
Why not match what SFML does? SFML retains |
Hello ! I actually tested with both Both worked fine (on my end) when I tested, but do you prefer the second option? |
I prefer the option which is most in line with SFML and requires the least possible changes to CSFML. |
From what I understand, And for the nix issue, it appears that |
Okay I'll change that :) |
Trying to replicate SFML/SFML#2835
tools/pkg-config/csfml-all.pc.in
Outdated
@@ -1,6 +1,6 @@ | |||
prefix=@CMAKE_INSTALL_PREFIX@ | |||
exec_prefix=${prefix} | |||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ | |||
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@ |
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.
SFML_RELATIVE_INSTALL_LIBDIR
doesn't exist in CSFML. Go look at that PR you linked to see where I defined that new variable and do something similar with CSFML.
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.
Yeah just saw that my bad :(
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.
What do you think of this?
It's heavily inspired by what was done on the SFML side
The code shouldn't blindly be based on what SFML is using, because that implementation is also partially broken (SFML/SFML#2917).
|
I can confirm that this PR solves the issue of The following is generated inside the
So I actually like the CMAKE_INSTALL_FULL_LIBDIR option better: it doesn't require an additional variable. The There is also an unrelated issue: when the prefix that is passed during installation is different from when configuring, the cmake --build build
cmake --install build --prefix whatever The same issue also exists when using CMAKE_INSTALL_FULL_LIBDIR instead of relying on the prefix variable. This is even documented in the CMAKE_INSTALL_FULL_<dir> documentation:
Edit: This seems to be an issue with only hacky solutions (see https://discourse.cmake.org/t/how-to-generate-pc-pkg-config-file-supporting-prefix-of-the-cmake-install/4109 and https://gitlab.kitware.com/cmake/cmake/-/issues/24887), so maybe we can just ignore it and assume that people who want pkg-config files will set CMAKE_INSTALL_PREFIX in a normal way instead of setting a different prefix at install time. |
@ChrisThrasher what's your opinion regarding this |
Following SFML/SFML#2835
NixOS/nixpkgs#312161 (comment)