Closed alexshpilkin closed 2 years ago
Thanks for the pointers. If I'm understanding correctly, libdir=@CMAKE_INSTALL_FULL_LIBDIR@
would be the correct setup, is that correct?
@davvid That is the simplest solution, except it sacrifices relocatability, which some people apparently depend on. I don’t actually know if this is important here; if so, the solution from KDE (use a separate variable, check with if (IS_ABSOLUTE ...)
and either prepend ${prefix}/
or leave as is) can be used.
Checking if the libdir is absolute and then conditionally prepending sounds like the way to go.
https://github.com/wdas/SeExpr/commit/b2656fbacf59eb8e2bcee8aefb39d40eb76ec94b added the IS_ABSOLUTE checks and variables used by https://github.com/wdas/SeExpr/commit/aad54f0dfe0de173e2c4e7d3c7df3b1a61e5ab31
As per title:
src/build/seexpr2.pc.in
hasand so can’t handle absolute paths in
CMAKE_INSTALL_LIBDIR
. This leads to broken .pc files on NixOS in particular.See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.