summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-08-13 22:01:25 +0200
committerMarco Trevisan <mail@3v1n0.net>2019-09-10 15:20:15 +0000
commitfcb5eefbea6c31947a8f0dfcb93f9ca5fed5853f (patch)
tree5ff25bac020cf2684ba228f1d693f87852363eee
parentde5d65b1ea2fbd46185cefd635eab61f08c012c1 (diff)
downloadlibwnck-fcb5eefbea6c31947a8f0dfcb93f9ca5fed5853f.tar.gz
build: Fix requires in pc files
When xres or libstartup-notification are not available, they were still being listed in Requires.private field of the pkg-config file. This is a regression in Meson build files compared to Autotools.
-rw-r--r--meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 632ed64..047e523 100644
--- a/meson.build
+++ b/meson.build
@@ -74,9 +74,13 @@ pc_conf.set('prefix', get_option('prefix'))
pc_conf.set('exec_prefix', '${prefix}')
pc_conf.set('libdir', '${exec_prefix}' / get_option('libdir'))
pc_conf.set('includedir', '${prefix}' / get_option('includedir'))
-pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
+if conf.has('HAVE_' + STARTUP_NOTIFICATION_PACKAGE.to_upper().underscorify())
+ pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
+endif
pc_conf.set('X11_PACKAGE', X11_PACKAGE)
-pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
+if conf.has('HAVE_' + XRES_PACKAGE.to_upper().underscorify())
+ pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
+endif
pc_conf.set('VERSION', meson.project_version())
foreach pc: [PACKAGE_NAME, PACKAGE_NAME + '-uninstalled']