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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1337>
This commit is contained in:
Xavier Claessens 2021-11-10 13:38:04 -05:00
parent 8e7ce64a6e
commit ffcf697c2d
2 changed files with 7 additions and 4 deletions

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

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