1 From 7327d5a7a29ad31af871e144ebe053cb1ab478f7 Mon Sep 17 00:00:00 2001
2 From: Vincent Abriou <vincent.abriou@st.com>
3 Date: Tue, 11 Oct 2016 13:47:03 +0200
4 Subject: [PATCH] libweston: fix building issue when EGL support is not enabled
6 weston-egl-ext.h has been include in compositor-xx.c file in order to
7 define EGL_PLATFORM_xxx_KHR extensions used by the compositors.
8 But in case EGL support is not enabled, all EGL related definition must
9 be skipped except EGL_PLATFORM_xxx_KHR that must be still defined to
10 allow compositor-xx.c to build.
12 Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
13 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
15 libweston/weston-egl-ext.h | 10 ++++++++++
16 1 file changed, 10 insertions(+)
18 diff --git a/libweston/weston-egl-ext.h b/libweston/weston-egl-ext.h
19 index 6e36996..70556fd 100644
20 --- a/libweston/weston-egl-ext.h
21 +++ b/libweston/weston-egl-ext.h
23 #ifndef WESTON_EGL_EXT_H
24 #define WESTON_EGL_EXT_H
28 #ifndef EGL_WL_bind_wayland_display
29 #define EGL_WL_bind_wayland_display 1
31 @@ -152,5 +154,13 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLD
32 #define EGL_PLATFORM_X11_KHR 0x31D5
35 +#else /* ENABLE_EGL */
37 +/* EGL platform definition are keept to allow compositor-xx.c to build */
38 +#define EGL_PLATFORM_GBM_KHR 0x31D7
39 +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
40 +#define EGL_PLATFORM_X11_KHR 0x31D5
42 +#endif /* ENABLE_EGL */