From 9ba510646ca5929cec109edb76a59c10fec6eb44 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Tue, 5 Apr 2022 15:01:29 +0200 Subject: [PATCH] cogl: Fix build without X11 Part-of: --- cogl/cogl/cogl-driver.h | 1 + cogl/cogl/cogl-fence.c | 2 +- cogl/test-fixtures/test-utils.c | 2 +- meson.build | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cogl/cogl/cogl-driver.h b/cogl/cogl/cogl-driver.h index aeabfe0e7..a87e57285 100644 --- a/cogl/cogl/cogl-driver.h +++ b/cogl/cogl/cogl-driver.h @@ -36,6 +36,7 @@ #include "cogl-framebuffer-private.h" #include "cogl-attribute-private.h" #include "cogl-sampler-cache-private.h" +#include "cogl-texture-private.h" typedef struct _CoglDriverVtable CoglDriverVtable; diff --git a/cogl/cogl/cogl-fence.c b/cogl/cogl/cogl-fence.c index b2fcd148a..a4d1ce730 100644 --- a/cogl/cogl/cogl-fence.c +++ b/cogl/cogl/cogl-fence.c @@ -29,9 +29,9 @@ #include "cogl-config.h" +#include "cogl-context-private.h" #include "cogl-fence.h" #include "cogl-fence-private.h" -#include "cogl-context-private.h" #include "winsys/cogl-winsys-private.h" #define FENCE_CHECK_TIMEOUT 5000 /* microseconds */ diff --git a/cogl/test-fixtures/test-utils.c b/cogl/test-fixtures/test-utils.c index dad881948..21e31346c 100644 --- a/cogl/test-fixtures/test-utils.c +++ b/cogl/test-fixtures/test-utils.c @@ -99,7 +99,7 @@ create_onscreen (CoglContext *cogl_context, break; #endif case COGL_WINSYS_ID_EGL_XLIB: -#ifdef COGL_HAS_EGL_SUPPORT +#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT return COGL_ONSCREEN (cogl_onscreen_xlib_new (cogl_context, width, height)); #else diff --git a/meson.build b/meson.build index 4768a8d14..48e66a58b 100644 --- a/meson.build +++ b/meson.build @@ -135,6 +135,10 @@ if have_xwayland and not have_wayland error('XWayland support requires Wayland support enabled') endif +if not have_wayland and not have_x11 + error('A Wayland/X11 backend must be enabled') +endif + if have_x11_client x11_dep = dependency('x11') xcomposite_dep = dependency('xcomposite', version: xcomposite_req)