meson dependency question
nirbheek.chauhan at gmail.com
Fri Apr 8 04:29:17 UTC 2022
On Fri, Apr 8, 2022 at 7:15 AM jim via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> 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/meson.build' 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 meson.build files.
So you need to add this inside the root meson.build 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