From db28f1912c43c1f9f5008f8f1ae0040ab6fb88f4 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 10 Jun 2025 09:30:41 +0000 Subject: [PATCH] wayland: fix EGL build without x11 Amend 7c0a96785fee4fea8ef1452166b1dde88957445c and add needed defines to fix EGL build without x11. Otherwise eglplatform.h will try to include X11 headers. See 4cc5428548cb8ab973e4b0281dd123d59bfaf6a0 for more details. Change-Id: I2c284219e83fecf862520a2f667d561adf4d4357 Reviewed-by: Axel Spoerl (cherry picked from commit 0f6c93c4534bd899444eceaeace34b2dd2a53ef6) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/wayland/CMakeLists.txt | 5 +++++ .../plugins/hardwareintegration/wayland-egl/CMakeLists.txt | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt index c5d76c12c43..ac90eeadfa2 100644 --- a/src/plugins/platforms/wayland/CMakeLists.txt +++ b/src/plugins/platforms/wayland/CMakeLists.txt @@ -223,6 +223,11 @@ qt_internal_extend_target(WaylandClient CONDITION QT_FEATURE_draganddrop qwaylanddnd.cpp qwaylanddnd_p.h ) +qt_internal_extend_target(WaylandClient CONDITION QT_FEATURE_egl AND NOT QT_FEATURE_egl_x11 + DEFINES + QT_EGL_NO_X11 +) + qt_internal_add_docs(WaylandClient doc/qtwaylandclient.qdocconf ) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt index ef3df07a434..68388d570c4 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/CMakeLists.txt @@ -29,5 +29,11 @@ qt_internal_add_plugin(QWaylandEglClientBufferPlugin QT_LICENSE_ID QT_COMMERCIAL_OR_LGPL3 ) +qt_internal_extend_target(QWaylandEglClientBufferPlugin CONDITION QT_FEATURE_egl AND NOT QT_FEATURE_egl_x11 + DEFINES + QT_EGL_NO_X11 +) + + #### Keys ignored in scope 1:.:.:wayland-egl.pro:: # OTHER_FILES = "wayland-egl.json"