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



commit dc79f009f9a2061d6083663274affe2bcf42d69b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Sep 26 20:53:22 2018 +0200

    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 514cf8e..8c30ebb 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]