nats.c icon indicating copy to clipboard operation
nats.c copied to clipboard

pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute

Open alexshpilkin opened this issue 2 years ago • 1 comments

As per title: src/libnats.pc.in has

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

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 17 '22 12:05 alexshpilkin

@alexshpilkin The pkg-config file was added by an external contributor. Would you mind contributing at fixing this since it looks like you have a grasp on what the exact issue is and how to reproduce (and therefore verify the fix)? If requiring CMake 3.20.0 is better, I think that this is a reasonable change to make too.

kozlovic avatar May 19 '22 00:05 kozlovic