[glib-networking] meson: allow building as a subproject
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] meson: allow building as a subproject
- Date: Wed, 28 Mar 2018 19:35:35 +0000 (UTC)
commit 9c03e2300eeeb2f335d5146328cd2eb8ca0b99e5
Author: Mathieu Duponchelle <mathieu centricular com>
Date: Mon Mar 26 23:11:45 2018 +0200
meson: allow building as a subproject
and use fallbacks for the mandatory dependencies
https://bugzilla.gnome.org/show_bug.cgi?id=794709
meson.build | 20 ++++++++++++++++----
proxy/gnome/meson.build | 2 ++
proxy/libproxy/meson.build | 2 ++
tls/gnutls/meson.build | 2 ++
tls/pkcs11/meson.build | 3 +++
tls/tests/meson.build | 2 ++
6 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1ea400d..4c62023 100644
--- a/meson.build
+++ b/meson.build
@@ -43,11 +43,23 @@ if host_machine.system().contains('linux')
endif
# *** Check GLib GIO ***
-glib_dep = dependency('glib-2.0', version: '>= 2.55.1')
-gio_dep = dependency('gio-2.0')
+glib_dep = dependency('glib-2.0', version: '>= 2.55.1',
+ fallback: ['glib', 'libglib_dep'])
+gio_dep = dependency('gio-2.0',
+ fallback: ['glib', 'libgio_dep'])
+gobject_dep = dependency('gio-2.0',
+ fallback: ['glib', 'libgobject_dep'])
+gmodule_dep = dependency('gmodule-2.0',
+ fallback: ['glib', 'libgmodule_dep'])
+
+if glib_dep.type_name() == 'internal'
+ glib_proj = subproject('glib')
+ gio_module_dir = glib_proj.get_variable('glib_giomodulesdir')
+else
+ gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir',
+ define_variable: ['libdir', libdir])
+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')
# *** Checks for LibProxy ***
diff --git a/proxy/gnome/meson.build b/proxy/gnome/meson.build
index 069a459..ed90537 100644
--- a/proxy/gnome/meson.build
+++ b/proxy/gnome/meson.build
@@ -6,6 +6,8 @@ sources = files(
deps = [
gio_dep,
glib_dep,
+ gmodule_dep,
+ gobject_dep,
gsettings_desktop_schemas_dep
]
diff --git a/proxy/libproxy/meson.build b/proxy/libproxy/meson.build
index baa7ab7..95839ae 100644
--- a/proxy/libproxy/meson.build
+++ b/proxy/libproxy/meson.build
@@ -29,6 +29,8 @@ sources = files(
deps = [
gio_dep,
glib_dep,
+ gmodule_dep,
+ gobject_dep,
libproxy_dep
]
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index 98bbb73..c4f5ef2 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -16,6 +16,8 @@ incs = [top_inc]
deps = [
gio_dep,
glib_dep,
+ gmodule_dep,
+ gobject_dep,
gnutls_dep
]
diff --git a/tls/pkcs11/meson.build b/tls/pkcs11/meson.build
index 5a9523a..94f55d9 100644
--- a/tls/pkcs11/meson.build
+++ b/tls/pkcs11/meson.build
@@ -7,6 +7,9 @@ sources = files(
deps = [
glib_dep,
+ gio_dep,
+ gmodule_dep,
+ gobject_dep,
pkcs11_dep
]
diff --git a/tls/tests/meson.build b/tls/tests/meson.build
index 261fa1e..7aeec87 100644
--- a/tls/tests/meson.build
+++ b/tls/tests/meson.build
@@ -6,6 +6,8 @@ incs = [
deps = [
gio_dep,
glib_dep,
+ gmodule_dep,
+ gobject_dep,
gnutls_dep
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]