[glib/wip/xclaesse/meson-gio-var-take2] meson: Add schemasdir and giomoduledir to gio dependency
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/xclaesse/meson-gio-var-take2] meson: Add schemasdir and giomoduledir to gio dependency
- Date: Wed, 23 Feb 2022 13:31:50 +0000 (UTC)
commit 218ac195df66bcf5de0716069cd37eb5843ad502
Author: Xavier Claessens <xavier claessens collabora com>
Date: Mon Feb 21 13:03:15 2022 -0500
meson: Add schemasdir and giomoduledir to gio dependency
This allows applications to get their value regardless whether glib is a
subproject or pkgconfig:
gio_dep = dependency('gio-2.0')
giomoduledir = gio_dep.get_variable('giomoduledir')
schemasdir = gio_dep.get_variable('schemasdir')
gio/meson.build | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gio/meson.build b/gio/meson.build
index 139a48c86..874de4b15 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -823,6 +823,16 @@ libgio_dep = declare_dependency(link_with : libgio,
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
include_directories : [gioinc])
+# Work around variables kwarg requiring Meson 0.56
+if meson.version().version_compare('>=0.56.0')
+ libgio_dep = declare_dependency(dependencies: libgio_dep,
+ variables: [
+ 'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
+ 'giomoduledir=' + glib_giomodulesdir,
+ ]
+ )
+endif
+
pkg.generate(libgio,
requires : ['glib-2.0', 'gobject-2.0'],
variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]