File 0001-CMake-Fix-qtwayland-feature-detection.patch of Package qt6-wayland
From 48ed4d4b3678506fea17086bc89744d447c9eb2f Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Fri, 4 Feb 2022 13:08:01 +0100
Subject: [PATCH] CMake: Fix qtwayland feature detection
The dmabuf_server_buffer test links to EGL and libdrm and the vulkan_server_buffer
one needs to link to wayland-client
Fixes: QTBUG-100475
Pick-to: 6.3 6.2
Change-Id: Idbcef88bba0a9d5ef7bfeaa55668c94caee6ab83
---
src/client/configure.cmake | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/client/configure.cmake b/src/client/configure.cmake
index 5a11bd1..21d9dd0 100644
--- a/src/client/configure.cmake
+++ b/src/client/configure.cmake
@@ -17,7 +17,6 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(Wayland PROVIDED_TARGETS Wayland::Egl MODULE_NAME waylandclient QMAKE_LIB wayland-egl)
endif()
qt_find_package(XComposite PROVIDED_TARGETS PkgConfig::XComposite MODULE_NAME waylandclient QMAKE_LIB xcomposite)
-# special case begin
# X11 is not a public dependency of QtGui anymore, so we need to find it manually in a shared build.
# In a static build the dependency is still propagated, so check for the target existence to prevent
# the 'Attempt to promote imported target "X11::X11" to global scope' issue.
@@ -28,7 +27,10 @@ endif()
if(NOT TARGET XKB::XKB)
qt_find_package(XKB 0.5.0 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon MARK_OPTIONAL)
endif()
-# special case end
+# EGL
+if(NOT TARGET EGL::EGL)
+ qt_find_package(EGL PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl MARK_OPTIONAL)
+endif()
# Even if libdrm is already found by qtbase we still need to list it as dependency for some of our
# plugins
@@ -120,6 +122,8 @@ return 1;
# vulkan-server-buffer
qt_config_compile_test(vulkan_server_buffer
LABEL "Vulkan Buffer Sharing"
+ LIBRARIES
+ Wayland::Client
CODE
"#define VK_USE_PLATFORM_WAYLAND_KHR 1
#include <vulkan/vulkan.h>
@@ -142,6 +146,7 @@ qt_config_compile_test(egl_1_5_wayland
LABEL "EGL 1.5 with Wayland Platform"
LIBRARIES
EGL::EGL
+ Wayland::Client
CODE
"
#include <EGL/egl.h>
--
2.35.1