meson: add a plugin summary

This summary displays a list of plugins which
have been enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/679>
This commit is contained in:
Stéphane Cerveau 2020-07-23 16:58:00 +02:00 committed by GStreamer Merge Bot
parent 0a453cc4a4
commit ca3b10a0f0

View file

@ -461,3 +461,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