meson dependency question

Nirbheek Chauhan nirbheek.chauhan at
Fri Apr 8 04:29:17 UTC 2022

On Fri, Apr 8, 2022 at 7:15 AM jim via gstreamer-devel
<gstreamer-devel at> wrote:

> But I'd prefer to put that option into a file so that a developer doesn't have to know about it.
> I thought I could edit './subprojects/gst-plugins-bad/sys/uvch264/' as follows:
> glib_dep = dependency('glib-2.0', version : '>=2.70', required : get_option('uvch264'), fallback : 'glib')

This won't work because meson will pick glib based on the requirement
of the *first* dependency() call. It can't "backtrack" and
re-interpret previously-interpreted files.

So you need to add this inside the root file of the
monorepo, before the gstreamer subprojects are invoked:

dependency('glib-2.0', version: '>=2.70', fallback: 'glib')

That should fix it.


More information about the gstreamer-devel mailing list