xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute

Open alexshpilkin opened this issue 3 years ago • 1 comments

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.

alexshpilkin avatar May 19 '22 14:05 alexshpilkin

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.

doronbehar avatar Sep 27 '23 13:09 doronbehar