pkg-config files are broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute
alexshpilkin opened this issue · comments
Alex Shpilkin commented
As per title: reproc++/reproc++.pc.in
and reproc/reproc.pc.in
have
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
and so can’t handle absolute paths in CMAKE_INSTALL_{INCLUDE,LIB}DIR
. 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.
Daan De Meyer commented
Makes sense, would happily review a PR for this