1
0
Fork 0

cogl: Stop auto generating gl/egl headers

They contain nothing that requires generating those headers
automatically
so simplify the whole thing

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3405>
This commit is contained in:
Bilal Elmoussaoui 2023-11-16 12:59:15 +01:00 committed by Marge Bot
parent f081d4b595
commit a8f77750fd
4 changed files with 20 additions and 41 deletions

View file

@ -32,6 +32,8 @@
#ifdef HAVE_EGL
@COGL_EGL_INCLUDES@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <EGL/eglmesaext.h>
#endif /* HAVE_EGL */

View file

@ -36,7 +36,12 @@
#include "config.h"
@COGL_GL_HEADER_INCLUDES@
#if defined(HAVE_GL)
#include <GL/gl.h>
#elif defined(HAVE_GLES2)
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
#ifndef GL_OES_EGL_image
#define GLeglImageOES void *

View file

@ -1,44 +1,6 @@
cogl_cogl_includesubdir = cogl_includesubdir / 'cogl'
cogl_cogl_includedir = cogl_includedir / 'cogl'
if have_gl
cogl_gl_header_includes = ['GL/gl.h']
elif have_gles2
cogl_gl_header_includes = ['GLES2/gl2.h', 'GLES2/gl2ext.h']
else
error('Neither GLES2 or OpenGL was enabled')
endif
cogl_gl_header_includes_string = ''
foreach gl_header : cogl_gl_header_includes
cogl_gl_header_includes_string += '#include <@0@>\n'.format(gl_header)
endforeach
cdata = configuration_data()
cdata.set('COGL_GL_HEADER_INCLUDES', cogl_gl_header_includes_string)
cogl_gl_header_h = configure_file(
input: 'cogl-gl-header.h.in',
output: 'cogl-gl-header.h',
configuration: cdata,
install: false,
)
if have_egl
cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>\n#include <EGL/eglmesaext.h>'
else
cogl_egl_includes_string = ''
endif
cdata = configuration_data()
cdata.set('COGL_EGL_INCLUDES', cogl_egl_includes_string)
cogl_egl_defines_h = configure_file(
input: 'cogl-egl-defines.h.in',
output: 'cogl-egl-defines.h',
configuration: cdata,
install: false,
)
cogl_deprecated_headers = [
'deprecated/cogl-program.h',
'deprecated/cogl-shader.h',
@ -172,6 +134,12 @@ if have_gles2
cogl_driver_sources += gles_driver_sources
endif
if have_gl or have_gles2
cogl_nonintrospected_headers += [
'cogl-gl-header.h'
]
endif
cogl_sources = [
cogl_driver_sources,
'winsys/cogl-winsys-private.h',
@ -362,7 +330,7 @@ endif
if have_egl
cogl_nonintrospected_headers += [
'cogl-egl.h',
cogl_egl_defines_h,
'cogl-egl-defines.h',
]
cogl_sources += [
'cogl-egl-private.h',

View file

@ -214,6 +214,10 @@ if have_gles2
endif
endif
if not have_gl and not have_gles2
error('Neither GLES2 or OpenGL was enabled')
endif
if have_wayland
wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
wayland_client_dep = dependency('wayland-client', version: wayland_server_req)