Skip to content

Commit 6ac4fdd

Browse files
committed
Fix cmake for qt6
For Qt6, prior Qt 6.10 the private is implicity, 6.10 seems to be explicit and has split cmake target.
1 parent 46a07a8 commit 6ac4fdd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

qt6/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11

2-
set(QT6_REQUIRED_COMPONENTS Core Gui GuiPrivate DBus Widgets)
2+
set(QT6_REQUIRED_COMPONENTS Core Gui DBus Widgets)
33

44
if (ENABLE_QT6_WAYLAND_WORKAROUND)
5-
list(APPEND QT6_REQUIRED_COMPONENTS WaylandClient WaylandClientPrivate WaylandGlobalPrivate)
5+
list(APPEND QT6_REQUIRED_COMPONENTS WaylandClient WaylandGlobalPrivate)
66
endif()
77
find_package(Qt6 ${REQUIRED_QT6_VERSION} CONFIG REQUIRED COMPONENTS ${QT6_REQUIRED_COMPONENTS})
88

9+
if (NOT TARGET Qt6::GuiPrivate)
10+
find_package(Qt6GuiPrivate CONFIG REQUIRED)
11+
endif()
12+
13+
if (ENABLE_QT6_WAYLAND_WORKAROUND AND NOT TARGET Qt6::WaylandClientPrivate)
14+
find_package(Qt6WaylandClientPrivate CONFIG REQUIRED)
15+
endif()
16+
17+
918
add_subdirectory(dbusaddons)
1019
add_subdirectory(platforminputcontext)
1120

0 commit comments

Comments
 (0)