[gnome-control-center/gbsneto/meson-cleanup: 5/5] meson: Use summary instead of manually built string
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/meson-cleanup: 5/5] meson: Use summary instead of manually built string
- Date: Mon, 12 Oct 2020 03:26:00 +0000 (UTC)
commit 0473ddce07effc478ae431e9d4fbbadb070104ee
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Oct 3 20:06:53 2020 -0300
meson: Use summary instead of manually built string
It simplifies the code, and allows us to have some consistency
between projects (either inside and outside GNOME, mind you).
I took the liberty to rename and reword some of the options so
that they actually describe which ones are optional, and also
which ones are hard dependencies detected at build time.
meson.build | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/meson.build b/meson.build
index a5a7ce53d..a2405087a 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
'gnome-control-center', 'c',
version : '40.alpha',
license : 'GPL2+',
- meson_version : '>= 0.51.0'
+ meson_version : '>= 0.53.0'
)
control_center_prefix = get_option('prefix')
@@ -291,21 +291,22 @@ configure_file(
configuration: config_h
)
-output = ''
-output += '\n ' + meson.project_name() + ' - ' + meson.project_version() + '\n'
-output += ' ===================================\n'
-output += ' Options \n'
-output += ' Documentation .............................. ' + get_option('documentation').to_string() +
'\n'
-output += ' Build Tests ................................ ' + get_option('tests').to_string() + '\n'
-output += ' Tracing .................................... ' + enable_tracing.to_string() + '\n'
-output += ' Optimized .................................. ' + control_center_optimized.to_string() + '\n'
-output += ' Panels \n'
-output += ' GNOME Bluetooth (Bluetooth panel) .......... ' + host_is_linux_not_s390.to_string() + '\n'
-output += ' Cheese (Users panel webcam support) ........ ' + enable_cheese.to_string() + '\n'
-output += ' IBus (Region panel IBus support) ........... ' + enable_ibus.to_string() + '\n'
-output += ' NetworkManager (Network panel) ............. ' + host_is_linux.to_string() + '\n'
-output += ' Wacom (Wacom tablet panel) ................. ' + host_is_linux_not_s390.to_string() + '\n'
-output += ' Snap support ............................... ' + enable_snap.to_string() + '\n'
-output += ' Malcontent support ......................... ' + enable_malcontent.to_string() + '\n'
-
-message(output)
+summary({
+ 'Documentation': get_option('documentation'),
+ 'Tests': get_option('tests'),
+ 'Tracing': enable_tracing,
+ 'Optimized': control_center_optimized,
+})
+
+summary({
+ 'GNOME Bluetooth': host_is_linux_not_s390,
+ 'NetworkManager': host_is_linux,
+ 'Wacom': host_is_linux_not_s390,
+}, section: 'Dependencies')
+
+summary({
+ 'Cheese': enable_cheese,
+ 'IBus': enable_ibus,
+ 'Snap': enable_snap,
+ 'Malcontent': enable_malcontent,
+}, section: 'Optional Dependencies')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]