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
| 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.
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.
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 whateverThe 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)