From 9bd8da6ed4aad610cb8227e0ba241853aa101c72 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 28 Nov 2018 20:46:05 +1100 Subject: [PATCH] gl/meson: Allow for the use of libGL as well as OpenGL OpenGL.framework and libGL are two different providers of a GL implementation that can be linked into an application together. --- gst-libs/gst/gl/meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index ffc18feeb5..897715b8e1 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -321,7 +321,12 @@ if need_api_opengl != 'no' or need_platform_glx != 'no' endif endif - glx_dep = gl_dep + if host_system == 'darwin' + glx_dep = cc.find_library('GL', required : false) + else + glx_dep = gl_dep + endif + if need_api_opengl == 'no' gl_dep = unneeded_dep endif @@ -572,7 +577,7 @@ if need_win_x11 != 'no' gl_winsys_deps += [x11_dep, xcb_dep] enabled_gl_winsys += 'x11' - if need_platform_glx != 'no' and glx_dep.found() + if need_platform_glx != 'no' and glx_dep.found() and cc.has_function ('glXMakeCurrent', dependencies : glx_dep) glconf.set('GST_GL_HAVE_PLATFORM_GLX', 1) gl_sources += [ 'x11/gstglcontext_glx.c',