lloyd / yajl

A fast streaming JSON parsing library in C.
http://lloyd.github.com/yajl
ISC License
2.15k stars 435 forks source link

cmake: Fix installing pkg-config file into libdir #216

Open mgorny opened 5 years ago

mgorny commented 5 years ago

Fix the CMake rules to install pkg-config file into lib/pkgconfig rather than share/pkgconfig. The former location is correct for ABI-dependent files such as libraries, while the latter should be used only for ABI-agnostic resources (data files, executables).

This fixes using yajl on multilib systems where 32-bit and 64-bit versions of the library are installed separately. This requires two separate pkg-config files to be installed along with the libraries into appropriate libdirs. When the file was installed into /usr/share, only one variant was permitted and effectively using the other multilib variant was broken, breaking other packages.

Original bug report: https://bugs.gentoo.org/677870

mgorny commented 5 years ago

This has been submitted as #158 previously but my PR is more complete as it changes internal layout as well.

mgorny commented 4 years ago

Ping.