From 58b9cfd916d393212c132f83a662d8de432fcffd Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 15 Nov 2019 17:53:14 +0100 Subject: [PATCH] Fix qtwaylandscanner package dependencies Use the new API provided in qtbase, to register a package dependency between the client module and the QtWaylandScannerTools package. Do the same for the compositor module. Also register a dependency between the QtWaylandScannerTools package and the WaylandScanner package. Also fix the tests condition to check the correct _FOUND variable. Change-Id: Id961a365715cef2d7d0b8a54ca9000dc3890ffd7 Reviewed-by: Leander Beernaert Reviewed-by: Alexandru Croitor --- src/plugins/platforms/wayland/CMakeLists.txt | 4 ++++ src/tools/qtwaylandscanner/CMakeLists.txt | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt index 248f7213665..597321a2ce2 100644 --- a/src/plugins/platforms/wayland/CMakeLists.txt +++ b/src/plugins/platforms/wayland/CMakeLists.txt @@ -146,3 +146,7 @@ qt_extend_target(WaylandClient CONDITION QT_FEATURE_draganddrop SOURCES qwaylanddnd.cpp qwaylanddnd_p.h ) + +# special case begin +qt_record_extra_qt_package_dependency(WaylandClient WaylandScannerTools "") +# special case end diff --git a/src/tools/qtwaylandscanner/CMakeLists.txt b/src/tools/qtwaylandscanner/CMakeLists.txt index 107702c3196..17254afc3c3 100644 --- a/src/tools/qtwaylandscanner/CMakeLists.txt +++ b/src/tools/qtwaylandscanner/CMakeLists.txt @@ -5,7 +5,7 @@ ##################################################################### qt_add_tool(qtwaylandscanner - TOOLS_TARGET QtWaylandScanner # special case + TOOLS_TARGET WaylandScanner # special case SOURCES qtwaylandscanner.cpp PUBLIC_LIBRARIES @@ -14,3 +14,9 @@ qt_add_tool(qtwaylandscanner #### Keys ignored in scope 1:.:.:qtwaylandscanner.pro:: # _OPTION = "host_build" + +# special case begin +# Abuse the function to make sure the package providing qtwaylandscanner calls +# find_package(WaylandScanner), aka the non-qt provided package. +qt_record_extra_package_dependency(qtwaylandscanner WaylandScanner "") +# special case end