mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 05:12:15 +00:00
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:
parent
f081d4b595
commit
a8f77750fd
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#ifdef HAVE_EGL
|
#ifdef HAVE_EGL
|
||||||
|
|
||||||
@COGL_EGL_INCLUDES@
|
#include <EGL/egl.h>
|
||||||
|
#include <EGL/eglext.h>
|
||||||
|
#include <EGL/eglmesaext.h>
|
||||||
|
|
||||||
#endif /* HAVE_EGL */
|
#endif /* HAVE_EGL */
|
@ -36,7 +36,12 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#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
|
#ifndef GL_OES_EGL_image
|
||||||
#define GLeglImageOES void *
|
#define GLeglImageOES void *
|
@ -1,44 +1,6 @@
|
|||||||
cogl_cogl_includesubdir = cogl_includesubdir / 'cogl'
|
cogl_cogl_includesubdir = cogl_includesubdir / 'cogl'
|
||||||
cogl_cogl_includedir = cogl_includedir / '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 = [
|
cogl_deprecated_headers = [
|
||||||
'deprecated/cogl-program.h',
|
'deprecated/cogl-program.h',
|
||||||
'deprecated/cogl-shader.h',
|
'deprecated/cogl-shader.h',
|
||||||
@ -172,6 +134,12 @@ if have_gles2
|
|||||||
cogl_driver_sources += gles_driver_sources
|
cogl_driver_sources += gles_driver_sources
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if have_gl or have_gles2
|
||||||
|
cogl_nonintrospected_headers += [
|
||||||
|
'cogl-gl-header.h'
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
cogl_sources = [
|
cogl_sources = [
|
||||||
cogl_driver_sources,
|
cogl_driver_sources,
|
||||||
'winsys/cogl-winsys-private.h',
|
'winsys/cogl-winsys-private.h',
|
||||||
@ -362,7 +330,7 @@ endif
|
|||||||
if have_egl
|
if have_egl
|
||||||
cogl_nonintrospected_headers += [
|
cogl_nonintrospected_headers += [
|
||||||
'cogl-egl.h',
|
'cogl-egl.h',
|
||||||
cogl_egl_defines_h,
|
'cogl-egl-defines.h',
|
||||||
]
|
]
|
||||||
cogl_sources += [
|
cogl_sources += [
|
||||||
'cogl-egl-private.h',
|
'cogl-egl-private.h',
|
||||||
|
@ -214,6 +214,10 @@ if have_gles2
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not have_gl and not have_gles2
|
||||||
|
error('Neither GLES2 or OpenGL was enabled')
|
||||||
|
endif
|
||||||
|
|
||||||
if have_wayland
|
if have_wayland
|
||||||
wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
|
wayland_server_dep = dependency('wayland-server', version: wayland_server_req)
|
||||||
wayland_client_dep = dependency('wayland-client', version: wayland_server_req)
|
wayland_client_dep = dependency('wayland-client', version: wayland_server_req)
|
||||||
|
Loading…
Reference in New Issue
Block a user