[gobject-introspection/ebassi/glib-update] build: Use dictionary for pkg-config variables



commit 0a2d142185ceecc2c581890ec7b35435954c2336
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jul 13 15:01:25 2022 +0100

    build: Use dictionary for pkg-config variables
    
    Makes it easier to read, and avoids escaping issues.

 meson.build | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index 33b3f407..4646f17b 100644
--- a/meson.build
+++ b/meson.build
@@ -248,20 +248,20 @@ if host_system == 'windows' or host_system == 'cygwin'
   exe_ext = '.exe'
 endif
 
-pkgconfig_variables = [
-  'g_ir_scanner=${bindir}/g-ir-scanner',
-  'g_ir_compiler=${bindir}/g-ir-compiler@0@'.format(exe_ext),
-  'g_ir_generate=${bindir}/g-ir-generate@0@'.format(exe_ext),
-  'gidatadir=${datadir}/gobject-introspection-1.0',
-  'girdir=' + gir_dir_pc_prefix / 'gir-1.0',
-  'typelibdir=${libdir}/girepository-1.0',
-]
+pkgconfig_variables = {
+  'g_ir_scanner': '${bindir}/g-ir-scanner',
+  'g_ir_compiler': '${bindir}/g-ir-compiler@0@'.format(exe_ext),
+  'g_ir_generate': '${bindir}/g-ir-generate@0@'.format(exe_ext),
+  'gidatadir': '${datadir}/gobject-introspection-1.0',
+  'girdir': gir_dir_pc_prefix / 'gir-1.0',
+  'typelibdir': '${libdir}/girepository-1.0',
+}
 
 if meson.version().version_compare('<0.62.0')
-  pkgconfig_variables += [
-    'datadir=' + '${prefix}' / get_option('datadir'),
-    'bindir=' + '${prefix}' / get_option('bindir'),
-  ]
+  pkgconfig_variables += {
+    'datadir': '${prefix}' / get_option('datadir'),
+    'bindir': '${prefix}' / get_option('bindir'),
+  }
 endif
 
 pkg.generate(girepo_lib,


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