Open intractabilis opened 7 months ago
For better or worse, that's the expected behaviour. Meson subprojects are not a tree (that would be a graph), but a flat hierarchy. They are all subprojects of the main project. That means you need to add the gpl
option into your project, or you can add in main project: project(..., default_options: ['gst-plugins-base:gpl=enabled', 'gst-plugins-good:gpl=enabled', ...])
.
Diverging: Hopefully GStreamer will one day accept to give up on core/base/good/bad/ugly split non-sense and make a single project.
What happens if I have another subproject, TumboYumbo, which has a subproject TumboBumbo, where gpl
is a Boolean? Can I have in my main project two options gpl
with different types?
Suppose you want to use GStreamer as a subproject. You create the following
meson.build
You also create the following
subprojects/gstreamer-full.wrap
Then you run
meson setup build
.GStreamer has a subproject
gst-plugins-bad
, which also has an optiongpl
that yieldsYou assume that since you set
gpl
toenabled
in the parent project,gst-plugins-bad
will yieldenabled
. To your utter surprise, it stays disabled.It seems like it's because of this line in
interpreter.py
as_root
makes it searchgpl
in your project, instead of the parent.This behavior is counterintuitive on multiple levels. Let's assume I create an option
gpl
in my project and assign itenabled
. It will behave strangely becausegpl
in GStreamer itself doesn't yield. Therefore, I will havegstreamer-full:gpl=whatever you set in default_options
,gst-plugins-bad:gpl=enabled
. Even more curious case would be if you have another subproject also with an optiongpl
that yields, but with a different type.