greatscottgadgets / libbtbb

A Bluetooth baseband decoding library
GNU General Public License v2.0
183 stars 88 forks source link

pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute #63

Open alexshpilkin opened 2 years ago

alexshpilkin commented 2 years ago

As per title: lib/libbtbb.pc.in has

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${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.

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.