[libwnck/wip/marco/meson-build: 3/3] meson: use dict for dependency list



commit 10a2ab127869bbe2dcaf829300d79d86ffd47b7a
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Sep 26 13:53:22 2018 -0500

    meson: use dict for dependency list
    
    It's way easier to read and manage, and since we already depend on newer meson
    we can safely go with it.

 meson.build | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2dcb28d..bc90eeb 100644
--- a/meson.build
+++ b/meson.build
@@ -39,19 +39,19 @@ X11_PACKAGE = 'x11'
 XRES_PACKAGE = 'xres'
 
 pkg_deps = [
-  ['cairo-xlib-xrender', [], false],
-  ['glib-2.0', '>= 2.32', true],
-  ['gobject-2.0', '>= 2.13.0', true],
-  ['gtk+-3.0', '>= 3.22.0', true],
-  [STARTUP_NOTIFICATION_PACKAGE, '>= 0.4', get_option('startup-notification').enabled()],
-  [X11_PACKAGE, [], true],
-  [XRES_PACKAGE, [], false],
+  {'name': 'cairo-xlib-xrender', 'required': false},
+  {'name': 'glib-2.0', 'version': '>= 2.32' },
+  {'name': 'gobject-2.0', 'version': '>= 2.13.0' },
+  {'name': 'gtk+-3.0', 'version': '>= 3.22.0' },
+  {'name': STARTUP_NOTIFICATION_PACKAGE, 'version': '>= 0.4', 'required': 
get_option('startup-notification').enabled() },
+  {'name': X11_PACKAGE },
+  {'name': XRES_PACKAGE, 'required': false},
 ]
 
 foreach p: pkg_deps
-  pkg = p.get(0)
-  required = p.get(2)
-  dep = dependency(pkg, version: p.get(1), required: required)
+  pkg = p.get('name')
+  required = p.get('required', true)
+  dep = dependency(pkg, version: p.get('version', []), required: required)
   LIBWNCK_DEPS += dep
 
   if not required and dep.found()


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