From d67a658daf52d2526cc2a1fd10291e04ed538670 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 12 May 2020 04:32:01 +0530 Subject: [PATCH] meson: Fix gstgl checks for qt and gtk Also rename from build_ to have_, which is more accurate. Part-of: --- ext/gtk/meson.build | 3 ++- ext/qt/meson.build | 2 +- meson.build | 4 ++-- tests/examples/gtk/meson.build | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/gtk/meson.build b/ext/gtk/meson.build index 1d2914b..d7167aa 100644 --- a/ext/gtk/meson.build +++ b/ext/gtk/meson.build @@ -12,7 +12,8 @@ optional_deps = [] gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) if gtk_dep.found() - if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0') + # FIXME: automagic + if have_gstgl and gtk_dep.version().version_compare('>=3.15.0') have_gtk3_gl_windowing = false if gst_gl_have_window_x11 and gst_gl_have_platform_glx diff --git a/ext/qt/meson.build b/ext/qt/meson.build index 3689a33..295d50d 100644 --- a/ext/qt/meson.build +++ b/ext/qt/meson.build @@ -26,7 +26,7 @@ if qt5_option.disabled() subdir_done() endif -if not build_gstgl +if not have_gstgl if qt5_option.enabled() error('qt5 qmlglsink plugin is enabled, but gstreamer-gl-1.0 was not found') endif diff --git a/meson.build b/meson.build index 28df2fc..b304900 100644 --- a/meson.build +++ b/meson.build @@ -273,9 +273,9 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req, gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req, fallback : ['gst-plugins-base', 'gstgl_dep'], required: false) -build_gstgl = gstgl_dep.found() # FIXME: add option? +have_gstgl = gstgl_dep.found() -if build_gstgl +if have_gstgl if gstgl_dep.type_name() == 'pkgconfig' gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split() gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split() diff --git a/tests/examples/gtk/meson.build b/tests/examples/gtk/meson.build index 36953dc..b3e4cc1 100644 --- a/tests/examples/gtk/meson.build +++ b/tests/examples/gtk/meson.build @@ -4,7 +4,7 @@ executable('gtksink', 'gtksink.c', include_directories: [configinc], install: false) -if build_gstgl +if have_gstgl executable('gtkglsink', 'gtkglsink.c', dependencies: [gst_dep, gstgl_dep, gtk_dep, x11_dep], c_args: gst_plugins_good_args, -- 2.7.4