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.
This commit is contained in:
Matthew Waters 2018-11-28 20:46:05 +11:00
parent db1722c9cb
commit 9bd8da6ed4

View file

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