sentencepiece
sentencepiece copied to clipboard
pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute
As per title: CMakeLists.txt has
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(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.
Identical to https://github.com/libjxl/libjxl/issues/1400 (fixed). 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.