From 005c2aad5e57ab58c22e72f74e9b5117f593f5e9 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 24 May 2023 13:29:59 +0200 Subject: [PATCH] Make sure that all wayland targets are found in source tree We look for wayland targets at feature evaluation step. Meanwhile recent changes related to the static Qt build disable promoting those targets to global because they might be already promoted by QtGui from wayland plugins. This adds the lookup of all required Wayland targets at src level, so we make sure they are accessible and valid for targets that link them. Amends 573486001f594ececfcd5797692ff6c48ceb493c Task-number: QTBUG-113560 Pick-to: 6.5 Change-Id: Id719f86c41c694278773720dd76260835645bfa6 Reviewed-by: Paul Wicking Reviewed-by: Qt CI Bot --- src/platformsupport/wayland/CMakeLists.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/platformsupport/wayland/CMakeLists.txt b/src/platformsupport/wayland/CMakeLists.txt index b804531aeff..c3219f9d293 100644 --- a/src/platformsupport/wayland/CMakeLists.txt +++ b/src/platformsupport/wayland/CMakeLists.txt @@ -4,13 +4,21 @@ # Generated from src.pro. # special case begin qt_find_package(WaylandScanner PROVIDED_TARGETS Wayland::Scanner) -if(TARGET Wayland::Client) - qt_internal_disable_find_package_global_promotion(Wayland::Client) -endif() -if(TARGET Wayland::Server) - qt_internal_disable_find_package_global_promotion(Wayland::Server) -endif() -qt_find_package(Wayland 1.15 PROVIDED_TARGETS Wayland::Client Wayland::Server) + +set(wayland_libs + Wayland::Client + Wayland::Server + Wayland::Cursor + Wayland::Egl +) + +foreach(lib IN LISTS wayland_libs) + if(TARGET ${lib}) + qt_internal_disable_find_package_global_promotion(${lib}) + endif() +endforeach() + +qt_find_package(Wayland 1.15 PROVIDED_TARGETS ${wayland_libs}) if (NOT WaylandScanner_FOUND OR NOT Wayland_FOUND) message(WARNING "QtWayland is missing required dependencies, nothing will be built. \