summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-09-02 10:46:45 -0400
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2022-09-02 15:01:45 +0000
commitef6f157205ab47a80ac316ed220b5ce15f2ef4ac (patch)
tree8bdf7f4acf325c66ec9b98d557f0995b9223aac4 /meson.build
parent57a6e48ed1c3bad72df656f74f0807dd40747554 (diff)
downloadgstreamer-ef6f157205ab47a80ac316ed220b5ce15f2ef4ac.tar.gz
meson: Subprjects can define both "plugins" and "gst_plugins"
If "gst_plugins" is defined we can ignore the value of legacy "plugins" variable, subprojects could be using it for something else, which is the case of gst-plugin-rs. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2976>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index ae1141645e..69f7d9bf46 100644
--- a/meson.build
+++ b/meson.build
@@ -174,12 +174,13 @@ foreach sp : subprojects
if subproj.found()
plugins = subproj.get_variable('gst_plugins', [])
+ legacy_plugins = subproj.get_variable('plugins', [])
all_plugins += plugins
- if subproj.get_variable('gst_plugins', []).length() != subproj.get_variable('plugins', plugins).length()
+ if plugins.length() == 0 and legacy_plugins.length() > 0
warning(f'DEPRECATED use of the `plugins` variable in @project_name@.')
warning('The variable should now be called `gst_plugins` and use:')
warning('`declare_dependency( link_with: <plugin_target>, variable: {\'full_path\': <plugin_target>.full_path()})` instead')
- foreach plugin: subproj.get_variable('plugins', [])
+ foreach plugin: legacy_plugins
all_plugins += [declare_dependency(link_with: plugin, variables: {'full_path': plugin.full_path()})]
endforeach
endif