xtensor
xtensor copied to clipboard
pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute
As per title: source/xtensor.pc.in has
prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
and so can’t handle absolute paths in CMAKE_INSTALL_LIBDIR. This leads to broken .pc files on NixOS in particular.
Identical to https://github.com/xtensor-stack/xsimd/issues/748. 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.
This is no longer an issue that breaks functionality in NixOS, see https://github.com/NixOS/nixpkgs/pull/225904 . However, in general, using the CMAKE_INSTALL_FULL_* variables is indeed a good practice.