blob: 47f8f4773415b8863d2a8912655cae649acb89de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From af2ca72030deb14a920a888e807dc732d93e3714 Mon Sep 17 00:00:00 2001
From: Heiko Becker <mail@heiko-becker.de>
Date: Thu, 4 Sep 2025 17:29:17 +0200
Subject: [PATCH] Search for private modules with Qt 6.10
Usage of private Qt modules requires a call to
`find_package(Qt6 COMPONENTS FooPrivate)` since 6.10 [1].
The build complains about
'CMake Error at CMakeLists.txt:909 (target_link_libraries):
Target "nheko" links to:
Qt::QmlPrivate
but the target was not found.'
otherwise.
[1] https://doc-snapshots.qt.io/qt6-dev/whatsnew610.html#build-system-changes
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c0854174..3476f51ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -247,6 +247,9 @@ endif()
# Discover Qt dependencies.
#
find_package(Qt6 6.5 COMPONENTS Core Widgets Gui LinguistTools Svg Multimedia Qml QuickControls2 REQUIRED)
+if (Qt6Qml_VERSION VERSION_GREATER_EQUAL "6.10.0")
+ find_package(Qt6 REQUIRED COMPONENTS GuiPrivate QmlPrivate)
+endif()
find_package(Qt6DBus)
if(USE_BUNDLED_QTKEYCHAIN)
|