Commit 6fe0ba70 authored by Nicolas Dufresne's avatar Nicolas Dufresne

meson: Allow making subproject optional

parent 3d8aca8e
...@@ -7,24 +7,26 @@ dependency('libavutil') ...@@ -7,24 +7,26 @@ dependency('libavutil')
dependency('srt') dependency('srt')
subprojects = [ subprojects = [
'orc', ['orc', {'required': true}],
'gstreamer', ['gstreamer', {'required': true}],
'libnice', ['libnice', {'required': true}],
'gst-plugins-base', ['gst-plugins-base', {'required': true}],
'gst-plugins-good', ['gst-plugins-good', {'required': true}],
'gst-plugins-bad', ['gst-plugins-bad', {'required': true}],
'gst-plugins-ugly', ['gst-plugins-ugly', {'required': true}],
'gst-libav', ['gst-libav', {'required': true}],
'gstreamer-vaapi', ['gstreamer-vaapi', {'required': false}],
] ]
common_opt = ['introspection=disabled', 'examples=disabled', 'doc=disabled', 'gtk_doc=disabled'] common_opt = ['introspection=disabled', 'examples=disabled', 'doc=disabled', 'gtk_doc=disabled']
build_opt = ['python=disabled', 'devtools=disabled', 'ges=disabled', 'rtsp_server=disabled'] build_opt = ['python=disabled', 'devtools=disabled', 'ges=disabled', 'rtsp_server=disabled']
run_command('meson', 'subprojects', 'download', 'gst-build') run_command('meson', 'subprojects', 'download', 'gst-build')
foreach p : subprojects foreach sp : subprojects
run_command('meson', 'wrap', 'promote', 'subprojects/gst-build/subprojects/' + p + '.wrap') sp_name = sp[0]
subproject(p, default_options: common_opt) sp_required = sp[1]['required']
run_command('meson', 'wrap', 'promote', 'subprojects/gst-build/subprojects/' + sp_name + '.wrap')
subproject(sp_name, default_options: common_opt, required: sp_required)
endforeach endforeach
subproject('gst-build', default_options: common_opt + build_opt) subproject('gst-build', default_options: common_opt + build_opt)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment