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')