[gtk+] meson: figure out wayland-protocols pkgdatadir via pkg-config



commit 1125e4d77c7fa070a23a4d54cf72a3d7a1ce03ab
Author: Tim-Philipp Müller <tim centricular com>
Date:   Tue Sep 20 16:46:30 2016 +0100

    meson: figure out wayland-protocols pkgdatadir via pkg-config
    
    Instead of hardcoding the location.

 gdk/wayland/meson.build |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build
index 85cac8b..6783ecf 100644
--- a/gdk/wayland/meson.build
+++ b/gdk/wayland/meson.build
@@ -1,8 +1,13 @@
 
 
 if wayland_enabled
-  #TODO: This should come from pkg-config --variable=pkgdatadir wayland-protocols
-  wayland_protocols_datadir = '/home/baedert/Source/gnome-configure/share/wayland-protocols/'
+  runcmd = run_command('pkg-config', '--variable=pkgdatadir', 'wayland-protocols')
+  if runcmd.returncode() == 0
+    wayland_protocols_datadir = runcmd.stdout().strip() + '/'
+  else
+    error('Could not get wayland-protocols pkgdatadir via pkg-config.')
+  endif
+
   wayland_scanner = find_program('wayland-scanner')
   genprotocols = find_program('genprotocolfiles.py')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]