This is the correct fix for https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/236
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/259>
endif
endif
-# Ensure that MSVC interprets all source code as UTF-8
-if cc.get_id() == 'msvc'
+# Ensure that MSVC interprets all source code as UTF-8. Only do this when we're
+# not a subproject, because subprojects are not allowed to call
+# add_global_arguments().
+if not meson.is_subproject() and cc.get_id() == 'msvc'
add_global_arguments(
cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
language: ['c', 'cpp'])