libsurvive
libsurvive copied to clipboard
pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute
Describe the bug
As per title: survive.pc.in has
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
and so can’t handle absolute paths in CMAKE_INSTALL_LIBDIR. This leads to broken .pc files on NixOS in particular.
Additional context
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.
For reference, the same issue happens also with libs/cnkalman/cnkalman.pc.in and libs/cnkalman/libs/cnmatrix/cnmatrix.pc.in