Commit e87fb02c authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

meson: fix opengl build against -base built with autotools

Detect opengl api from -base .pc files correctly.

There was a mismatch between the .pc files generated by
autotools and by meson that would lead to meson not detecting
that opengl api is available even though it is. This could
lead to build failures when building -bad with meson against
a -base that was built with autotools. The mismatch has now
been rectified but we will still check the old one for backwards
compatibility.

Fixes #871
parent 982f8394
......@@ -12,7 +12,7 @@ if build_gstgl and gstgl_dep.found()
optional_deps = []
opengl_defines = ['-DGST_USE_UNSTABLE_API'] # for videoaggregator
if gst_gl_have_api_opengl # have desktop GL
if gst_gl_have_api_gl # have desktop GL
opengl_sources += [
'gstglmosaic.c',
]
......
......@@ -410,8 +410,12 @@ if build_gstgl
set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p))
endforeach
foreach api : ['opengl', 'gles2']
foreach api : ['gl', 'gles2']
set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
# temporary backwards compat for older meson-generated .pc file with 'opengl' instead of 'gl'
if gst_gl_apis.contains('opengl')
gst_gl_have_api_gl = true
endif
endforeach
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment