summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-22 20:40:17 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-22 20:41:23 +0100
commit6b6d6f0afa7d1b3bdca2e72c2b77b01c00f0e543 (patch)
tree732ede79b01f59d8001e60f030a918f5109651bd
parent1af14211d06f5799384126326243c90f3624e1bf (diff)
downloadpango-6b6d6f0afa7d1b3bdca2e72c2b77b01c00f0e543.tar.gz
meson: Ensure we generate the appropriate pkg-config files
The Pango pkg-config files are generated depending on the platform we are building for, and backends we are using. Only the `pango.pc` file is generated unconditionally.
-rw-r--r--meson.build25
1 files changed, 19 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 2571ccc7..1a0ff0e4 100644
--- a/meson.build
+++ b/meson.build
@@ -344,12 +344,25 @@ pkgconf.set('VERSION', meson.project_version())
pkgconf.set('PANGO_API_VERSION', pango_api_version)
pkgconf.set('PKGCONFIG_CAIRO_REQUIRES', pangocairo_requires)
-foreach pkg: [ 'pango.pc', 'pangowin32.pc', 'pangoft2.pc', 'pangoxft.pc', 'pangocairo.pc', ]
- configure_file(input: '@0@.in'.format(pkg),
- output: pkg,
- configuration: pkgconf,
- install: true,
- install_dir: join_paths(pango_libdir, 'pkgconfig'))
+pkgconf_files = [
+ [ 'pango.pc' ],
+ [ 'pangowin32.pc', host_system == 'windows' ],
+ [ 'pangoft2.pc', freetype_dep.found() ],
+ [ 'pangoxft.pc', xft_dep.found() ],
+ [ 'pangocairo.pc', cairo_dep.found() ],
+]
+
+foreach pkg: pkgconf_files
+ pkg_name = pkg[0]
+ pkg_enabled = pkg.get(1, true)
+
+ if pkg_enabled
+ configure_file(input: pkg_name + '.in',
+ output: pkg_name,
+ configuration: pkgconf,
+ install: true,
+ install_dir: join_paths(pango_libdir, 'pkgconfig'))
+ endif
endforeach
gnome = import('gnome')