On 12/9/22 09:51, Markus Armbruster wrote:
Because of where [pixman] is added as a dependency in meson.build.
Is it added where it is for a reason, or is it accidental?
Dependencies are usually added near the .c files that use them. That's
a bit messy of course if you have an "#include <>" in a heavily-included
QEMU header. You can consider it a way to discourage heavily-included
headers.
If you have a dependency in multiple unrelated .c files, specifying them
in multiple foo_ss.add() invocations doesn't hurt. In fact it is both
clearer and more compact, because it removes the need for "if"s.
The only dependency that you don't need to specify is glib, partly for
historical pre-Meson reasons partly because it would be everywhere. For
the others, if it makes sense to add them to multiple source sets you're
welcome to do so.
Paolo