-cdata = configuration_data()
-cdata.set('LIBAV_SOURCE', '"system install"')
-cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
-cdata.set('PACKAGE', '"gst-libav"')
-
-# GStreamer package name and origin url
-gst_package_name = get_option('package-name')
-if gst_package_name == ''
- if gst_version_nano == 0
- gst_package_name = 'GStreamer FFMPEG Plug-ins source release'
- elif gst_version_nano == 1
- gst_package_name = 'GStreamer FFMPEG Plug-ins git'
+# 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'])
+endif
+
+building_full = get_option('default_library') == 'static'
+tools_option = []
+if building_full and not get_option('tools').disabled()
+ # Do not build subprojects tools when we build them against gst-full
+ tools_option = ['tools=disabled']
+endif
+
+# Ordered list of subprojects (dict has no ordering guarantees)
+subprojects = [
+ ['gstreamer', {'build-hotdoc': true, 'subproject_options': tools_option}],
+ ['gst-plugins-base', {'option': get_option('base'), 'build-hotdoc': true}],
+ ['gst-plugins-good', {'option': get_option('good'), 'build-hotdoc': true}],
+ ['libnice', { 'option': get_option('libnice'), 'match_gst_version': false}],
+ ['gst-plugins-bad', { 'option': get_option('bad'), 'build-hotdoc': true}],
+ ['gst-plugins-ugly', { 'option': get_option('ugly'), 'build-hotdoc': true}],
+ ['gst-libav', { 'option': get_option('libav'), 'build-hotdoc': true}],
+ ['gst-rtsp-server', { 'option': get_option('rtsp_server'), 'build-hotdoc': true}],
+ ['gst-devtools', { 'option': get_option('devtools'), 'build-hotdoc': true, 'subproject_options': tools_option}],
+ ['gst-integration-testsuites', { 'option': get_option('devtools') }],
+ ['gst-editing-services', { 'option': get_option('ges'), 'build-hotdoc': true, 'subproject_options': tools_option}],
+ ['gstreamer-vaapi', { 'option': get_option('vaapi'), 'build-hotdoc': true}],
+ ['gst-omx', { 'option': get_option('omx'), 'build-hotdoc': true}],
+ ['gstreamer-sharp', { 'option': get_option('sharp') }],
+ ['pygobject', { 'option': get_option('python'), 'match_gst_version': false, 'sysdep': 'pygobject-3.0', 'sysdep_version': '>= 3.8' }],
+ ['gst-python', { 'option': get_option('python')}],
+ ['gst-examples', { 'option': get_option('gst-examples'), 'match_gst_versions': false}],
+ ['gst-plugins-rs', { 'option': get_option('rs'), 'build-hotdoc': true, 'match_gst_version': false}],
+]
+
+if build_system == 'windows'
+ subproject('win-flex-bison-binaries')
+ subproject('win-nasm')
+elif build_system == 'darwin'
+ subproject('macos-bison-binary')
+endif
+
+orc_option = get_option('orc')
+# There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build
+orc_req = '>= 0.4.24'
+orc_source_option = get_option('orc-source')
+orc_subproject = disabler()
+if orc_option.allowed()
+ if orc_source_option == 'subproject'
+ orc_subproject = subproject('orc', required: orc_option)