From d3029ec0d606016f4d0ba15ea64812a12b607087 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 5 Apr 2019 15:27:37 +0200 Subject: [PATCH] add libnice as a top-level subproject. When relying on a system-wide libnice, we end up not building the nice elements, which means we can't use them, and by extension webrtcbin, in the uninstalled environment. This also introduces a way to avoid checking the version of a given subproject, and makes use of it for libnice and pygobject, which only passed the version check by chance, as its current major version is 3. --- meson.build | 12 ++++++++++-- meson_options.txt | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 426e8edff7..f0c7c410dd 100644 --- a/meson.build +++ b/meson.build @@ -35,6 +35,7 @@ subprojects = [ ['gstreamer', {}], ['gst-plugins-base', {}], ['gst-plugins-good', {}], + ['libnice', { 'option': get_option('libnice'), 'match_gst_version': false}], ['gst-plugins-bad', { 'option': get_option('bad') }], ['gst-plugins-ugly', { 'option': get_option('ugly') }], ['gst-libav', { 'option': get_option('libav') }], @@ -45,7 +46,7 @@ subprojects = [ ['gstreamer-vaapi', { 'option': get_option('vaapi') }], ['gst-omx', { 'option': get_option('omx'), }], ['gstreamer-sharp', { 'option': get_option('sharp') }], - ['pygobject', { 'option': get_option('python') }], + ['pygobject', { 'option': get_option('python'), 'match_gst_version': false }], ['gst-python', { 'option': get_option('python') }], ] @@ -69,7 +70,14 @@ foreach sp : subprojects project_name = sp[0] build_infos = sp[1] is_required = build_infos.get('option', true) - subproj = subproject(project_name, version: gst_version, required: is_required) + match_gst_version = build_infos.get('match_gst_version', true) + + if match_gst_version + subproj = subproject(project_name, version: gst_version, required: is_required) + else + subproj = subproject(project_name, required: is_required) + endif + if subproj.found() subprojects_names += [project_name] cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir())) diff --git a/meson_options.txt b/meson_options.txt index 0d36f6ebb5..624979b621 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,6 @@ option('python', type : 'feature', value : 'auto') option('libav', type : 'feature', value : 'auto') +option('libnice', type : 'feature', value : 'auto') option('ugly', type : 'feature', value : 'auto') option('bad', type : 'feature', value : 'auto') option('devtools', type : 'feature', value : 'auto')