From d454f95a094383260d4231a87b9131e146e60743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Sat, 25 Jul 2020 21:19:20 +0100 Subject: [PATCH] meson: add a plugin summary This summary displays a list of plugins which have been enabled. Part-of: --- meson.build | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meson.build b/meson.build index 174b1e7a4d..7111f1e807 100644 --- a/meson.build +++ b/meson.build @@ -286,3 +286,18 @@ endif configure_file(output : 'config.h', configuration : cdata) run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') + +if meson.version().version_compare('>= 0.54') + plugin_names = [] + foreach plugin: plugins + # FIXME: Use str.subtring() when we can depend on Meson 0.56 + split = plugin.name().split('gst') + if split.length() == 2 + plugin_names += [split[1]] + else + warning('Need substring API in meson >= 0.56 to properly parse plugin name: ' + plugin.name()) + plugin_names += [plugin.name()] + endif + endforeach + summary({'Plugins':plugin_names}, list_sep: ', ') +endif