gst-python: Add option to disable python plugin
authorXavier Claessens <xavier.claessens@collabora.com>
Wed, 10 Nov 2021 18:38:04 +0000 (13:38 -0500)
committerXavier Claessens <xavier.claessens@collabora.com>
Wed, 10 Nov 2021 18:38:04 +0000 (13:38 -0500)
It is not always needed, at least Ubuntu package it separately and don't
install it by default. Also when doing a static build there is an
unavoidable warning otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1337>

subprojects/gst-python/meson.build
subprojects/gst-python/meson_options.txt

index 682a0e8..56b4834 100644 (file)
@@ -97,10 +97,12 @@ if get_option('default_library') == 'shared'
 endif
 
 subdir('gi')
-if get_option('default_library') != 'static'
-  subdir('plugin')
-else
-  warning('Python plugin not supported with `static` builds yet.')
+if not get_option('plugin').disabled()
+  if get_option('default_library') != 'static'
+    subdir('plugin')
+  else
+    warning('Python plugin not supported with `static` builds yet.')
+  endif
 endif
 if not get_option('tests').disabled()
   subdir('testsuite')
index 110f0b9..9759102 100644 (file)
@@ -4,3 +4,4 @@ option('libpython-dir', type : 'string', value : '',
         description: 'Path to find libpythonXX.so')
 option('python', type : 'string', value : 'python3')
 option('tests', type : 'feature', value : 'auto', yield : true)
+option('plugin', type : 'feature', value : 'auto')