Generate pkg-config files using Meson's pkgconfig module
Hi,
This attempts to switch from generating pkg-config files with hard-coded packages/libraries via templates for the sake of autotools build compatibility to using Meson's pkgconfig
module to do that for us for the dependencies that are being used, as:
- We may have different naming schemes for the packages that we link to, as they may or may not be found by pkg-config (e.g. ZLib), meaning that
-lz
may be wrong, for instance. - Make the pkg-config file stuff be in their subdirs instead.
- We don't need to construct strings for the dependent packages and libraries in the
.pc
files in addition to feeding the dependencies in the build targets/libraries. We do sadly, continue need to separate the dependencies by their types, as we actually did before, since thepkgconfig
module currently seerequires:
andlibraries:
(and their_private
counterparts) separately, and dependencies can have different build systems. - For the
-Wl,...
items that we put into the pkg-config files, we continue to do so due to specific linking needs. For the macOS ones, it might be good if someone can let me know that I can just feed these as dependencies into thelibraries:
section.
With blessings, thank you!