base:gl: add x11 deps to gstglx11_dep
authorStéphane Cerveau <scerveau@collabora.com>
Tue, 29 Mar 2022 15:51:13 +0000 (17:51 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 1 Apr 2022 00:43:54 +0000 (00:43 +0000)
On MacOS with homebrew the xlib-xcb.h is in
own cellar /opt/homebrew/Cellar/libx11/1.7.3.1/include
Need to add the windowing dependencies to gl tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2061>

subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build
subprojects/gst-plugins-base/tests/check/libs/gstglmatrix.c
subprojects/gst-plugins-base/tests/check/meson.build

index 190de71..6acf5e3 100644 (file)
@@ -1,6 +1,11 @@
+gstgl_dep = dependency('', required : false)
+gstglproto_dep = dependency('', required : false)
+gstglx11_dep = dependency('', required : false)
+gstglwayland_dep = dependency('', required : false)
+gstglegl_dep = dependency('', required : false)
+
 if get_option('gl').disabled()
   message('GStreamer OpenGL integration disabled via options.')
-  gstgl_dep = dependency('', required: false)
   build_gstgl = false
   subdir_done()
 endif
@@ -650,6 +655,7 @@ if need_platform_glx == 'yes'
   endif
 endif
 
+xcb_dep = unneeded_dep
 if need_win_x11 != 'no'
   xcb_dep = dependency('x11-xcb', required : false)
   if x11_dep.found() and xcb_dep.found()
@@ -966,12 +972,6 @@ if enabled_gl_winsys.length() == 0
   build_gstgl = false
 endif
 
-gstgl_dep = dependency('', required : false)
-gstglproto_dep = dependency('', required : false)
-gstglx11_dep = dependency('', required : false)
-gstglwayland_dep = dependency('', required : false)
-gstglegl_dep = dependency('', required : false)
-
 if build_gstgl
   # find some types that may or may not be defined
   if cc.has_type('GLeglImageOES', prefix : gl_include_block, dependencies : gl_lib_deps, include_directories : gl_includes)
@@ -1144,7 +1144,7 @@ if build_gstgl
         gl_x11_gir = gnome.generate_gir(gstgl, kwargs: gir)
       endif
     endif
-    gstglx11_dep = declare_dependency(dependencies : [gstgl_dep],
+    gstglx11_dep = declare_dependency(dependencies : [gstgl_dep, x11_dep, xcb_dep],
       sources : gl_x11_gir)
     meson.override_dependency('gstreamer-gl-x11-1.0', gstglx11_dep)
   endif
index 04ddd4e..aff8d78 100644 (file)
@@ -22,7 +22,7 @@
 #  include "config.h"
 #endif
 
-#include <gst/gl/gstglutils.c>
+#include <gst/gl/gl.h>
 #undef GST_CAT_DEFAULT
 #include <gst/check/gstcheck.h>
 
index e7dec6c..d36b763 100644 (file)
@@ -11,7 +11,7 @@ base_tests = [
   [ 'libs/baseaudiovisualizer.c' ],
   [ 'libs/discoverer.c' ],
   [ 'libs/fft.c' ],
-  [ 'libs/libsabi.c', false, [ gstgl_dep ] ],
+  [ 'libs/libsabi.c', false, [ gstgl_dep, gstglx11_dep, gstglwayland_dep, gstglegl_dep ] ],
   [ 'libs/mikey.c' ],
   [ 'libs/navigation.c' ],
   [ 'libs/pbutils.c' ],
@@ -92,8 +92,8 @@ if build_gstgl and host_machine.system() != 'windows'
     [ 'libs/gstglcontext.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
     [ 'libs/gstglfeature.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
     [ 'libs/gstglformat.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
-    [ 'libs/gstglheaders.c', not build_gstgl, [gstgl_dep]],
-    [ 'libs/gstglmatrix.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
+    [ 'libs/gstglheaders.c', not build_gstgl, [gstgl_dep, gstglx11_dep, gstglwayland_dep, gstglegl_dep]],
+    [ 'libs/gstglmatrix.c', not build_gstgl, [gstgl_dep]],
     [ 'libs/gstglmemory.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
     [ 'libs/gstglquery.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],
     [ 'libs/gstglshader.c', not build_gstgl, [gstgl_dep, gstglproto_dep]],