From 995d110fe63ed159354a5fe323d204c6968cacec Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Fri, 7 Apr 2017 12:19:27 -0700 Subject: [PATCH] meson: gl: set default value of 0 for glconf vars meson's configure_file emits only a comment like /* #undef ... */ for values which are unset in the configuration_data. For gstglconfig.h, this differs from the autotools build where the preprocessor definitions are always either 0 or 1. So loop over a list of variables to set to zero as default. Also sync up the gstglconfig.h.meson file with the additional macros defined by the autotools build. https://bugzilla.gnome.org/show_bug.cgi?id=781043 --- gst-libs/gst/gl/gstglconfig.h.meson | 6 +++-- gst-libs/gst/gl/meson.build | 36 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/gstglconfig.h.meson b/gst-libs/gst/gl/gstglconfig.h.meson index ebe410dbc5..05aafa3b79 100644 --- a/gst-libs/gst/gl/gstglconfig.h.meson +++ b/gst-libs/gst/gl/gstglconfig.h.meson @@ -22,6 +22,7 @@ G_BEGIN_DECLS #mesondefine GST_GL_HAVE_WINDOW_ANDROID #mesondefine GST_GL_HAVE_WINDOW_DISPMANX #mesondefine GST_GL_HAVE_WINDOW_EAGL +#mesondefine GST_GL_HAVE_WINDOW_VIV_FB #mesondefine GST_GL_HAVE_PLATFORM_EGL #mesondefine GST_GL_HAVE_PLATFORM_GLX @@ -29,6 +30,9 @@ G_BEGIN_DECLS #mesondefine GST_GL_HAVE_PLATFORM_CGL #mesondefine GST_GL_HAVE_PLATFORM_EAGL +#mesondefine GST_GL_HAVE_DMABUF +#mesondefine GST_GL_HAVE_VIV_DIRECTVIV + #mesondefine GST_GL_HAVE_GLEGLIMAGEOES #mesondefine GST_GL_HAVE_GLCHAR #mesondefine GST_GL_HAVE_GLSIZEIPTR @@ -38,8 +42,6 @@ G_BEGIN_DECLS #mesondefine GST_GL_HAVE_GLINT64 #mesondefine GST_GL_HAVE_EGLATTRIB -#mesondefine GST_GL_HAVE_DMABUF - G_END_DECLS #endif /* __GST_GL_CONFIG_H__ */ diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index 3b9d6dc7bb..f0ec2faf83 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -88,6 +88,42 @@ gl_cocoa_headers = [] gl_egl_headers = [] glconf = configuration_data() +glconf_options = [ + 'GST_GL_HAVE_OPENGL', + 'GST_GL_HAVE_GLES2', + 'GST_GL_HAVE_GLES3', + + 'GST_GL_HAVE_WINDOW_X11', + 'GST_GL_HAVE_WINDOW_COCOA', + 'GST_GL_HAVE_WINDOW_WIN32', + 'GST_GL_HAVE_WINDOW_WAYLAND', + 'GST_GL_HAVE_WINDOW_ANDROID', + 'GST_GL_HAVE_WINDOW_DISPMANX', + 'GST_GL_HAVE_WINDOW_EAGL', + 'GST_GL_HAVE_WINDOW_VIV_FB', + + 'GST_GL_HAVE_PLATFORM_EGL', + 'GST_GL_HAVE_PLATFORM_GLX', + 'GST_GL_HAVE_PLATFORM_WGL', + 'GST_GL_HAVE_PLATFORM_CGL', + 'GST_GL_HAVE_PLATFORM_EAGL', + + 'GST_GL_HAVE_DMABUF', + 'GST_GL_HAVE_VIV_DIRECTVIV', + + 'GST_GL_HAVE_GLEGLIMAGEOES', + 'GST_GL_HAVE_GLCHAR', + 'GST_GL_HAVE_GLSIZEIPTR', + 'GST_GL_HAVE_GLINTPTR', + 'GST_GL_HAVE_GLSYNC', + 'GST_GL_HAVE_GLUINT64', + 'GST_GL_HAVE_GLINT64', + 'GST_GL_HAVE_EGLATTRIB', +] + +foreach option : glconf_options + glconf.set10(option, false) +endforeach gmodule_dep = dependency('gmodule-no-export-2.0') unneeded_dep = dependency('', required : false)