From 8bc739fcc2f89fd5bc12f3a5bdfc56226637fb01 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 9 Sep 2020 18:47:03 +0200 Subject: [PATCH] CMake: Register qtwaylandscanner dependency when cross-compiling qt_record_extra_package_dependency is called by qtwayland to register a dependency between the qtwaylandscanner tool and the waylandscanner tool. When cross-compiling the tools in a Yocto environment, the adjusted target name was not taken into account. Task-number: QTBUG-83968 Change-Id: Ibf7b94876bf29827cf0d9c9bb471f359ef6ff15f Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- cmake/QtFindPackageHelpers.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake index f5d84f0456..204222f58b 100644 --- a/cmake/QtFindPackageHelpers.cmake +++ b/cmake/QtFindPackageHelpers.cmake @@ -172,6 +172,9 @@ endmacro() # main_target_name = qtwaylandscanner # dep_package_name = WaylandScanner function(qt_record_extra_package_dependency main_target_name dep_package_name dep_package_version) + if(NOT TARGET "${main_target_name}") + qt_get_tool_target_name(main_target_name "${main_target_name}") + endif() if (TARGET "${main_target_name}") get_target_property(extra_packages "${main_target_name}" QT_EXTRA_PACKAGE_DEPENDENCIES) if(NOT extra_packages)