yaml-cpp icon indicating copy to clipboard operation
yaml-cpp copied to clipboard

Install pkgconfig and cmake files into arch-dependent locations

Open tgurr opened this issue 4 years ago • 2 comments

This restores the CMake / installed files behaviour of version 0.6.3 which changed in 0.7.0, resulting in arch-dependent files ending up in /usr/share instead of $prefix/libdir. This is required on multiarch/cross layouts setting the prefix to e.g. /usr/x86_64-pc-linux-gnu or /usr/i686-pc-linux-gnu so a pkg-config file in /usr/share like

prefix=/usr/x86_64-pc-linux-gnu
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

Name: Yaml-cpp
Description: A YAML parser and emitter for C++
Version: 0.7.0
Requires:
Libs: -L${libdir} -lyaml-cpp
Cflags: -I${includedir}

would be wrong as it contains arch-specific code.

tgurr avatar Oct 29 '21 08:10 tgurr

This sounds reasonable to me, but I've been bitten quite a bit lately by approving CMake changes I don't understand. Could you add a clause to the github action here that tests the behavior you'd like to see? That way it'll guarantee that the behavior you want is preserved even if people later update the CMake file.

jbeder avatar Nov 23 '21 04:11 jbeder

Thanks for the suggestion, however I'm not familiar with GitHub Actions and/or writing any tests so I'll most likely not being able to help with or contribute anything in this regard.

tgurr avatar Nov 23 '21 10:11 tgurr

See also https://github.com/jbeder/yaml-cpp/pull/1020.

tgurr avatar Aug 30 '22 19:08 tgurr

You know what, this is fine; if it breaks someone's build then I guess I can ask them to write a test.

jbeder avatar Sep 20 '22 05:09 jbeder