[glib-networking: 111/129] Properly define gio_module_dir



commit 793e1b85b71a8832918e1511fa8d45a865cfe8d4
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Fri Mar 16 12:59:21 2018 +0100

    Properly define gio_module_dir
    
    See https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

 meson.build       | 7 +++----
 meson_options.txt | 1 -
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7194edd..7f09dec 100644
--- a/meson.build
+++ b/meson.build
@@ -10,10 +10,9 @@ glib = dependency('glib-2.0', version: '>=' + glib_req)
 gobject = dependency('gobject-2.0', version: '>=' + glib_req)
 gio = dependency('gio-2.0', version: '>=' + glib_req)
 
-gio_module_dir = get_option('gio_module_dir')
-if gio_module_dir == ''
-  gio_module_dir = gio.get_pkgconfig_variable('giomoduledir')
-endif
+gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir',
+                                                define_variable: ['libdir', libdir])
+assert(gio_module_dir != '', 'GIO_MODULE_DIR is missing from gio-2.0.pc')
 
 gio_querymodules = find_program('gio-querymodules')
 
diff --git a/meson_options.txt b/meson_options.txt
index c4e07c9..265f608 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1 @@
 option('ca_certificates', type: 'string', value: '', description: 'Path to system Certificate Authority 
list')
-option('gio_module_dir', type: 'string', value: '', description: 'Custom directory for gio modules')


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