cxxopts
cxxopts copied to clipboard
pkg-config file is broken when CMAKE_INSTALL_INCLUDEDIR is absolute
As per title: packaging/pkgconfig.pc.in
has
prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
and so can’t handle absolute paths in CMAKE_INSTALL_INCLUDEDIR
. 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.
Can you give me a cmake command that sets that variable to reproduce this?