summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-10-13 12:38:35 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-10-13 14:17:13 +0000
commit547570cd790f2b2e390edc1dfb5df4c7a33de45c (patch)
tree71acdf0c18a5893fa16e550203458214b7fbf2e9 /meson.build
parent9f13ee5b0eada5ca0997e59be2ef46d5c2dd1dcd (diff)
downloadgstreamer-547570cd790f2b2e390edc1dfb5df4c7a33de45c.tar.gz
build: Disable pygobject submodule if system version exists
If pygobject is available on the system, its version is new enough, don't build the older pygobject and rely on that system one. This fixes totem not being able to use libpeas' Python support. ** (totem:544972): WARNING **: 12:04:05.407: Error initializing Python Plugin Loader: PyGObject initialization failed ImportError: could not import gobject (version mismatch, 3.40.1 is required, found 3.38.1) Closes: #806 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1135>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 73b654bb9e..1458acc2fb 100644
--- a/meson.build
+++ b/meson.build
@@ -86,7 +86,7 @@ subprojects = [
['gstreamer-vaapi', { 'option': get_option('vaapi'), 'build-hotdoc': true}],
['gst-omx', { 'option': get_option('omx'), 'build-hotdoc': true}],
['gstreamer-sharp', { 'option': get_option('sharp') }],
- ['pygobject', { 'option': get_option('python'), 'match_gst_version': false }],
+ ['pygobject', { 'option': get_option('python'), 'match_gst_version': false, 'sysdep': 'pygobject-3.0', 'sysdep_version': '>= 3.38.1' }],
['gst-python', { 'option': get_option('python')}],
['gst-examples', { 'option': get_option('gst-examples'), 'match_gst_versions': false}],
['gst-plugins-rs', { 'option': get_option('rs'), 'match_gst_version': false}],
@@ -116,10 +116,17 @@ foreach sp : subprojects
project_name = sp[0]
build_infos = sp[1]
is_required = build_infos.get('option', true)
+ sysdep = build_infos.get('sysdep', '')
+ sysdep_version = build_infos.get('sysdep_version', '')
match_gst_version = build_infos.get('match_gst_version', true)
if match_gst_version
subproj = subproject(project_name, version: gst_version, required: is_required)
+ elif sysdep != ''
+ sysdep_dep = dependency(sysdep, version: sysdep_version, required: false)
+ if not sysdep_dep.found()
+ subproj = subproject(project_name, required: is_required)
+ endif
else
subproj = subproject(project_name, required: is_required)
endif