meson: Fix gstgl checks for qt and gtk

Also rename from build_ to have_, which is more accurate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/587>
This commit is contained in:
Nirbheek Chauhan 2020-05-12 04:32:01 +05:30
parent 2ecba800bf
commit d67a658daf
4 changed files with 6 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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()

View file

@ -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,