diff --git a/ext/gtk/meson.build b/ext/gtk/meson.build index d7167aa3e8..3a30017e75 100644 --- a/ext/gtk/meson.build +++ b/ext/gtk/meson.build @@ -20,7 +20,7 @@ if gtk_dep.found() # FIXME: automagic gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) if gtk_x11_dep.found() - optional_deps += gtk_x11_dep + optional_deps += [gtk_x11_dep, gstglx11_dep] have_gtk3_gl_windowing = true endif endif @@ -29,7 +29,7 @@ if gtk_dep.found() # FIXME: automagic gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) if gtk_wayland_dep.found() - optional_deps += gtk_wayland_dep + optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep] have_gtk3_gl_windowing = true endif endif @@ -39,7 +39,7 @@ if gtk_dep.found() 'gstgtkglsink.c', 'gtkgstglwidget.c', ] - optional_deps += gstgl_dep + optional_deps += [gstgl_dep, gstglproto_dep] gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] endif endif diff --git a/ext/qt/meson.build b/ext/qt/meson.build index e342f64548..90e967ed13 100644 --- a/ext/qt/meson.build +++ b/ext/qt/meson.build @@ -79,7 +79,7 @@ if gst_gl_have_window_x11 and gst_gl_have_platform_glx # FIXME: automagic qt5x11extras = dependency('qt5', modules : ['X11Extras'], required : false) if qt5x11extras.found() - optional_deps += qt5x11extras + optional_deps += [qt5x11extras, gstglx11_dep] qt_defines += ['-DHAVE_QT_X11'] have_qt_windowing = true endif @@ -88,8 +88,7 @@ endif if gst_gl_have_platform_egl # Embedded linux (e.g. i.MX6) with or without windowing support qt_defines += ['-DHAVE_QT_EGLFS'] - egl_dep = dependency('egl', required : false) - optional_deps += egl_dep + optional_deps += gstglegl_dep have_qt_windowing = true if have_qpa_include # Wayland windowing @@ -97,7 +96,7 @@ if gst_gl_have_platform_egl # FIXME: automagic qt5waylandextras = dependency('qt5', modules : ['WaylandClient'], required : false) if qt5waylandextras.found() - optional_deps += qt5waylandextras + optional_deps += [qt5waylandextras, gstglwayland_dep] qt_defines += ['-DHAVE_QT_WAYLAND'] have_qt_windowing = true endif @@ -156,7 +155,7 @@ if have_qt_windowing cpp_args : gst_plugins_good_args + qt_defines, link_args : noseh_link_args, include_directories: [configinc, libsinc], - dependencies : [glib_deps, gst_dep, gstvideo_dep, gstgl_dep, qt5qml_dep, optional_deps], + dependencies : [glib_deps, gst_dep, gstvideo_dep, gstgl_dep, gstglproto_dep, qt5qml_dep, optional_deps], override_options : ['cpp_std=c++11'], install: true, install_dir : plugins_install_dir) diff --git a/meson.build b/meson.build index 4c3262d1cb..0159e5385a 100644 --- a/meson.build +++ b/meson.build @@ -271,6 +271,10 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req, # FIXME: automagic gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req, fallback : ['gst-plugins-base', 'gstgl_dep'], required: false) +gstglproto_dep = dependency('', required : false) +gstglx11_dep = dependency('', required : false) +gstglwayland_dep = dependency('', required : false) +gstglegl_dep = dependency('', required : false) have_gstgl = gstgl_dep.found() @@ -301,6 +305,25 @@ if have_gstgl foreach api : ['gl', 'gles2'] set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api)) endforeach + + gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'gstglproto_dep'], required: true) + # Behind specific checks because meson fails at optional dependencies with a + # fallback to the same subproject. On the first failure, meson will never + # check the system again even if the fallback never existed. + # Last checked with meson 0.54.3 + if gst_gl_have_window_x11 + gstglx11_dep = dependency('gstreamer-gl-x11-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'gstglx11_dep'], required: true) + endif + if gst_gl_have_window_wayland + gstglwayland_dep = dependency('gstreamer-gl-wayland-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'gstglwayland_dep'], required: true) + endif + if gst_gl_have_platform_egl + gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true) + endif endif zlib_dep = dependency('zlib', required : false) diff --git a/tests/examples/gtk/meson.build b/tests/examples/gtk/meson.build index b3e4cc15b5..76e9f4f8ea 100644 --- a/tests/examples/gtk/meson.build +++ b/tests/examples/gtk/meson.build @@ -12,7 +12,7 @@ if have_gstgl install: false) executable('glliveshader', 'glliveshader.c', - dependencies: [gst_dep, gstgl_dep, gtk_dep, x11_dep], + dependencies: [gst_dep, gstgl_dep, gstglproto_dep, gtk_dep, x11_dep], c_args: gst_plugins_good_args, include_directories: [configinc], install: false)