dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.48k stars 112 forks source link

pkg-config files are broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute #2661

Open alexshpilkin opened 2 years ago

alexshpilkin commented 2 years ago

As per title: tools/notcurses-core.pc.in, tools/notcurses-ffi.pc.in, tools/notcurses++.pc.in, and tools/notcurses.pc.in have

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

and so can’t handle absolute paths in CMAKE_INSTALL_{INCLUDE,LIB}DIR. This leads to broken .pc files on NixOS in particular. (Deriving libdir from prefix and not exec_prefix also seems a bit suspect, but is not the problem here.)

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.