cxxopts icon indicating copy to clipboard operation
cxxopts copied to clipboard

pkg-config file is broken when CMAKE_INSTALL_INCLUDEDIR is absolute

Open alexshpilkin opened this issue 2 years ago • 1 comments

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.

alexshpilkin avatar May 16 '22 12:05 alexshpilkin

Can you give me a cmake command that sets that variable to reproduce this?

jarro2783 avatar Jun 15 '22 21:06 jarro2783