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 <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2023-05-24 13:29:59 +02:00
parent 5921924fba
commit 005c2aad5e

View File

@ -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. \