From 7b615e92b6be969af0ae10fb5cdf49e0f998cbda Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 11 May 2017 20:05:24 +1000 Subject: [PATCH] build/gl/meson: check for GLES3/gl3ext.h existence 791e7522ebcb75beb31fcace271dee1342d3505d for meson https://bugzilla.gnome.org/show_bug.cgi?id=781885 --- gst-libs/gst/gl/gstglconfig.h.meson | 1 + gst-libs/gst/gl/meson.build | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/gst-libs/gst/gl/gstglconfig.h.meson b/gst-libs/gst/gl/gstglconfig.h.meson index 05aafa3b79..ea74934f75 100644 --- a/gst-libs/gst/gl/gstglconfig.h.meson +++ b/gst-libs/gst/gl/gstglconfig.h.meson @@ -14,6 +14,7 @@ G_BEGIN_DECLS #mesondefine GST_GL_HAVE_OPENGL #mesondefine GST_GL_HAVE_GLES2 #mesondefine GST_GL_HAVE_GLES3 +#mesondefine GST_GL_HAVE_GLES3EXT3_H #mesondefine GST_GL_HAVE_WINDOW_X11 #mesondefine GST_GL_HAVE_WINDOW_COCOA diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index 12ef4daaf3..a8f40bf7b7 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -93,6 +93,7 @@ glconf_options = [ 'GST_GL_HAVE_OPENGL', 'GST_GL_HAVE_GLES2', 'GST_GL_HAVE_GLES3', + 'GST_GL_HAVE_GLES3EXT3_H', 'GST_GL_HAVE_WINDOW_X11', 'GST_GL_HAVE_WINDOW_COCOA', @@ -305,6 +306,8 @@ endif # GLES2 checks gles2_dep = unneeded_dep +gles3_h = false +gles3ext3_h = false if need_api_gles2 != 'no' gles2_dep = dependency('glesv2', required : false) if not gles2_dep.found() @@ -328,9 +331,14 @@ if need_api_gles2 != 'no' # include #else''' if gles3_h + gles3ext3_h = gles3_h and cc.has_header('GLES3/gl3ext.h', required : false, dependencies : gles2_dep) gles_includes += ''' # include +# include ''' + if gles3ext3_h + gles_includes += ''' # include ''' + endif else gles_includes += ''' # include @@ -368,6 +376,9 @@ if gles2_dep.found() glconf.set10('GST_GL_HAVE_GLES2', 1) if gles3_h glconf.set10('GST_GL_HAVE_GLES3', 1) + if gles3ext3_h + glconf.set10('GST_GL_HAVE_GLES3EXT3_H', 1) + endif endif enabled_gl_apis += 'gles2' endif