From ffcf697c2d090adde8e13fa617283314501853f5 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 10 Nov 2021 13:38:04 -0500 Subject: [PATCH] gst-python: Add option to disable python plugin 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: --- subprojects/gst-python/meson.build | 10 ++++++---- subprojects/gst-python/meson_options.txt | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-python/meson.build b/subprojects/gst-python/meson.build index 682a0e87a7..56b4834287 100644 --- a/subprojects/gst-python/meson.build +++ b/subprojects/gst-python/meson.build @@ -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') diff --git a/subprojects/gst-python/meson_options.txt b/subprojects/gst-python/meson_options.txt index 110f0b9680..9759102928 100644 --- a/subprojects/gst-python/meson_options.txt +++ b/subprojects/gst-python/meson_options.txt @@ -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')