diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2023-05-24 13:29:59 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-05-26 12:06:40 +0000 |
commit | 4ad977719e10d04645d7d01bbfb28d0c17dca200 (patch) | |
tree | 9ce63ee0f9937dd8c7ec1fe548472d95e5adb04b | |
parent | 36816c8084a96e86b49481de7263e11cf212e0df (diff) |
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 4af0e67e9a9c5ada5ce6639726c2a39d6e5e1267
Task-number: QTBUG-113560
Change-Id: Id719f86c41c694278773720dd76260835645bfa6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 63971b603860ae10f95a2b160d4c87231fd85475)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/CMakeLists.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b804531ae..c3219f9d2 100644 --- a/src/CMakeLists.txt +++ b/src/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. \ |