diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2019-12-23 08:51:55 +0300 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2019-12-24 11:28:56 +0300 |
commit | 317679fec33d290cafa0119fd645ecaee75f08a1 (patch) | |
tree | e793f10e128eccb5f5ec3dea6f9cf376bdf26bfd /meson.build | |
parent | e877da0ba3b895c5d6df63fe1eea7d106a835338 (diff) |
meson: add gstreamer-rs deps
Fix race when building from gst-build as we need to be sure that all
these deps have been built before starting building gst-plugins-rs which
will build gstreamer-rs.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meson.build b/meson.build index ecae6447e..2e9f86b98 100644 --- a/meson.build +++ b/meson.build @@ -44,6 +44,34 @@ foreach p, lib : plugins_rep output += [lib + '.' + ext] endforeach +# Need to depends on all gstreamer-rs deps to ensure they are built +# before gstreamer-rs when building with gst-build. +# Custom targets can't depend on dependency() objects so we have to depend +# on the library variable from the subproject instead. +gst_req = '>= 1.14.0' +depends = [] + +deps = [ + # name, subproject name, subproject dep, library object + ['gstreamer-1.0', 'gstreamer', 'gst_dep', 'libgst'], + ['gstreamer-app-1.0', 'gst-plugins-base', 'app_dep', 'gstapp'], + ['gstreamer-audio-1.0', 'gst-plugins-base', 'audio_dep', 'gstaudio'], + ['gstreamer-base-1.0', 'gstreamer', 'gst_base_dep', 'gst_base'], + ['gstreamer-check-1.0', 'gstreamer', 'gst_check_dep', 'gst_check'], + ['gstreamer-net-1.0', 'gstreamer', 'gst_net_dep', 'gst_net'], + ['gstreamer-rtp-1.0', 'gst-plugins-base', 'rtp_dep', 'gst_rtp'], + ['gstreamer-video-1.0', 'gst-plugins-base', 'video_dep', 'gstvideo'], +] + +foreach d: deps + dep = dependency(d[0], version : gst_req, + fallback : [d[1], d[2]]) + if dep.type_name() == 'internal' + lib = subproject(d[1]).get_variable(d[3]) + depends += lib + endif +endforeach + # Always build the target so we don't have to list all source files as input rs_plugins = custom_target('gst-plugins-rs', build_by_default: true, @@ -51,6 +79,7 @@ rs_plugins = custom_target('gst-plugins-rs', console: true, install: false, build_always_stale: true, + depends: depends, command: [cargo_script, meson.current_build_dir(), meson.current_source_dir(), |