[glib-networking] Meson: Use summary() to print enabled modules
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Meson: Use summary() to print enabled modules
- Date: Fri, 12 Aug 2022 14:43:26 +0000 (UTC)
commit 3ee6d3e358d7deb78cd6dca5c5196f018bed34bc
Author: Xavier Claessens <xavier claessens collabora com>
Date: Thu Jun 23 11:07:00 2022 -0400
Meson: Use summary() to print enabled modules
Also build a list of modules so parent project can know which one have
been configured.
meson.build | 18 +++++++++++-------
proxy/environment/meson.build | 2 ++
proxy/gnome/meson.build | 2 ++
proxy/libproxy/meson.build | 2 ++
tls/gnutls/meson.build | 2 ++
tls/openssl/meson.build | 2 ++
6 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 65c4aee7..aadb19e7 100644
--- a/meson.build
+++ b/meson.build
@@ -141,6 +141,10 @@ endif
proxy_test_programs = []
+# When glib-networking is a subproject this variable is used by parent project
+# to know which modules have been built.
+giomodules = []
+
subdir('po')
subdir('proxy')
subdir('tls')
@@ -151,10 +155,10 @@ if gio_querymodules.found()
meson.add_install_script('meson_post_install.py', gio_querymodules.path(), gio_module_dir)
endif
-output = '\n\n'
-output += ' GnuTLS support: ' + backends.contains('gnutls').to_string() + '\n'
-output += ' OpenSSL support: ' + backends.contains('openssl').to_string() + '\n'
-output += ' environment proxy support: ' + environment_proxy_enabled.to_string() + '\n'
-output += ' libproxy support: ' + libproxy_dep.found().to_string() + '\n'
-output += ' GNOME proxy support: ' + gsettings_desktop_schemas_dep.found().to_string() + '\n'
-message(output)
+summary({
+ 'GnuTLS support': giomodules.contains('giognutls'),
+ 'OpenSSL support': giomodules.contains('gioopenssl'),
+ 'Environment proxy support': giomodules.contains('gioenvironmentproxy'),
+ 'libproxy support': giomodules.contains('giolibproxy'),
+ 'GNOME proxy support': giomodules.contains('giognomeproxy'),
+}, bool_yn: true)
diff --git a/proxy/environment/meson.build b/proxy/environment/meson.build
index 6cab3607..fb2d9d59 100644
--- a/proxy/environment/meson.build
+++ b/proxy/environment/meson.build
@@ -13,6 +13,8 @@ deps = [
gobject_dep
]
+giomodules += 'gioenvironmentproxy'
+
module = shared_module(
'gioenvironmentproxy',
sources: sources,
diff --git a/proxy/gnome/meson.build b/proxy/gnome/meson.build
index ffe590fc..2cd88761 100644
--- a/proxy/gnome/meson.build
+++ b/proxy/gnome/meson.build
@@ -11,6 +11,8 @@ deps = [
gsettings_desktop_schemas_dep
]
+giomodules += 'giognomeproxy'
+
module = shared_module(
'giognomeproxy',
sources: sources,
diff --git a/proxy/libproxy/meson.build b/proxy/libproxy/meson.build
index a9bd59de..1efa99ca 100644
--- a/proxy/libproxy/meson.build
+++ b/proxy/libproxy/meson.build
@@ -34,6 +34,8 @@ deps = [
libproxy_dep
]
+giomodules += 'giolibproxy'
+
module = shared_module(
'giolibproxy',
sources: sources,
diff --git a/tls/gnutls/meson.build b/tls/gnutls/meson.build
index 5b1a0766..286990ea 100644
--- a/tls/gnutls/meson.build
+++ b/tls/gnutls/meson.build
@@ -20,6 +20,8 @@ deps = [
tlsbase_dep
]
+giomodules += 'giognutls'
+
module = shared_module(
'giognutls',
sources: sources,
diff --git a/tls/openssl/meson.build b/tls/openssl/meson.build
index 6a16ccda..b1adab73 100644
--- a/tls/openssl/meson.build
+++ b/tls/openssl/meson.build
@@ -33,6 +33,8 @@ elif ['windows'].contains(host_system)
]
endif
+giomodules += 'gioopenssl'
+
module = shared_module(
'gioopenssl',
sources: sources,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]