meson dependency question

jim jim at
Sat Apr 9 00:30:00 UTC 2022

> Message: 2
> Date: Fri, 8 Apr 2022 09:59:17 +0530
> From: Nirbheek Chauhan <nirbheek.chauhan at>
> To: Discussion of the development of and with GStreamer
> 	<gstreamer-devel at>
> Cc: jim <jim at>
> Subject: Re: meson dependency question
> Message-ID:
> 	<CADqQcK6bczT8eA9vz0rFSiOBkzA=JxizzjFEzhFM4GqahL6qsg at>
> Content-Type: text/plain; charset="UTF-8"
> 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')

Yes, this did the trick. Thanks! Makes sense somewhat, but it's unfortunate that a subproject can't override that. It seems logical (to me) that if one pulled in a new subproject that required a (newer) version of a package (that was already included by the main, or other siubproject), only the new subproject should need to control that. That way, if the new subproject got removed later, the dependency would go with it as well.

thanks again,

More information about the gstreamer-devel mailing list