DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

alexshpilkin opened this issue · comments

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.

Makes sense, would happily review a PR for this