From 876e901020f28c8e8e90303499007983a3a54ead Mon Sep 17 00:00:00 2001 From: svan71 <48870638+svan71@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:56:05 -0400 Subject: [PATCH] build: request Qt CorePrivate/WidgetsPrivate components in application-tray application-tray links against Qt6::CorePrivate and Qt6::WidgetsPrivate but only requests the public Core, Gui, Widgets and DBus components. From Qt 6.10 those *Private imported targets are no longer available transitively, so configuring fails unless the private components are requested explicitly: CMake Error at plugins/application-tray/CMakeLists.txt:70 (target_link_libraries): Target "application-tray" links to: Qt6::CorePrivate but the target was not found. Gate the private find_package on Qt >= 6.10, matching the pattern used in dtklog and other Deepin projects, while still requesting both CorePrivate and WidgetsPrivate because this target links both. Reproduced on a pristine checkout with Qt 6.11.1. --- plugins/application-tray/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/application-tray/CMakeLists.txt b/plugins/application-tray/CMakeLists.txt index 14db09618..386623d9e 100644 --- a/plugins/application-tray/CMakeLists.txt +++ b/plugins/application-tray/CMakeLists.txt @@ -7,7 +7,10 @@ set(PLUGIN_NAME "application-tray") project(${PLUGIN_NAME}) find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED Core Gui Widgets DBus) +find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Widgets DBus) +if(Qt${QT_VERSION_MAJOR}_VERSION VERSION_GREATER_EQUAL 6.10) + find_package(Qt${QT_VERSION_MAJOR} COMPONENTS CorePrivate WidgetsPrivate REQUIRED) +endif() find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED Core Gui Widget Tools) find_package(KF6WindowSystem 6.6 REQUIRED) # for x11 tray selection owner