add libnice as a top-level subproject.
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 5 Apr 2019 13:27:37 +0000 (15:27 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Fri, 5 Apr 2019 13:27:37 +0000 (15:27 +0200)
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
meson_options.txt

index 426e8ed..f0c7c41 100644 (file)
@@ -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()))
index 0d36f6e..624979b 100644 (file)
@@ -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')