libmalcontent: Rework pkg-config file generation

Meson 0.49 has matured its pkg-config file generation a little, and the
API has subtly changed. The main library we’re building a pkg-config
file for is now passed as the first argument; and all dependencies can
be passed to `libraries`/`libraries_private`. Any dependencies which
provide pkg-config files will automatically be moved into the pkg-config
file’s `Requires`/`Requires.private` sections.

See https://mesonbuild.com/Pkgconfig-module.html#implicit-dependencies

This bumps our Meson dependency to ≥ 0.49.0.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-01-31 18:11:34 +00:00
parent f64d4111f4
commit 2a3f0fd741
2 changed files with 4 additions and 5 deletions

View File

@ -46,15 +46,14 @@ install_headers(libmalcontent_headers,
subdir: libmalcontent_include_subdir,
)
pkgconfig.generate(
libraries: [ libmalcontent ],
pkgconfig.generate(libmalcontent,
subdirs: libmalcontent_api_name,
version: meson.project_version(),
name: 'libmalcontent',
filebase: libmalcontent_api_name,
description: 'Library providing access to parental control settings.',
requires: libmalcontent_public_deps,
requires_private: libmalcontent_private_deps,
libraries: libmalcontent_public_deps,
libraries_private: libmalcontent_private_deps,
)
gnome.generate_gir(libmalcontent,

View File

@ -1,6 +1,6 @@
project('malcontent', 'c',
version : '0.4.0',
meson_version : '>= 0.47.0',
meson_version : '>= 0.49.0',
license: 'LGPLv2.1+',
default_options : [
'buildtype=debugoptimized',