summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2021-09-09 23:07:51 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-09-13 12:53:33 +0200
commitb6496e344535ad3f85cfaa97fc17f9447dac9dcf (patch)
treebcbd65c58eb7d1938ad3be3263ab33c9c524e4f9 /meson.build
parent0171c5ba37cd7e62d9c2c8b756744e3fbc86f1d0 (diff)
build: Make use of the summary function
Since meson 0.53, it has added a new function to summarize the build configuration[0]. The summary has been changed to make use of it. meson version has been bumped to 0.53. [0] https://mesonbuild.com/Release-notes-for-0-53-0.html#add-a-new-summary-function (cherry picked from commit ba4c55e09eb9901acf1169c0238ae1bfafdb8e98)
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build37
1 files changed, 20 insertions, 17 deletions
diff --git a/meson.build b/meson.build
index 770b026..c149b0a 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,7 @@ project(
'c_std=gnu89',
'warning_level=2',
],
- meson_version: '>= 0.48.0',
+ meson_version: '>= 0.53.0',
)
qmi_version = meson.project_version()
@@ -255,19 +255,22 @@ meson.add_install_script(
enable_bash_completion ? bash_completion_completionsdir : '',
)
-output = '\n' + meson.project_name() + ' ' + meson.project_version() + '\n\n'
-output += ' Build\n'
-output += ' compiler: ' + cc.get_id() + '\n'
-output += ' cflags: ' + ' '.join(cc_flags) + '\n'
-output += ' Documentation: ' + enable_gtk_doc.to_string() + '\n'
-output += ' bash completion: ' + enable_bash_completion.to_string() + '\n'
-output += ' gobject introspection: ' + enable_gir.to_string() + '\n\n'
-output += ' System paths\n'
-output += ' prefix: ' + qmi_prefix + '\n'
-output += ' udev base directory: ' + qmi_username + '\n\n'
-output += ' Features\n'
-output += ' QMI over MBIM: ' + enable_mbim_qmux.to_string() + '\n'
-output += ' QMI over QRTR: ' + enable_qrtr.to_string() + '\n'
-output += ' QMI username: ' + qmi_username + '\n'
-output += ' rmnet support: ' + enable_rmnet.to_string()
-message(output)
+summary({
+ 'compiler': cc.get_id(),
+ 'cflags': cc_flags,
+ 'Documentation': enable_gtk_doc,
+ 'bash completion': enable_bash_completion,
+ 'gobject introspection': enable_gir,
+}, section: 'Build')
+
+summary({
+ 'prefix': qmi_prefix,
+ 'udev base directory': (enable_qmi_username ? udev_udevdir : 'disabled'),
+}, section: 'System paths')
+
+summary({
+ 'QMI over MBIM': enable_mbim_qmux,
+ 'QMI over QRTR': enable_qrtr,
+ 'QMI username': qmi_username,
+ 'rmnet support': enable_rmnet,
+}, section: 'Features')