diff options
| author | Mike Lothian <mike@fireburn.co.uk> | 2025-10-23 18:03:21 +0100 |
|---|---|---|
| committer | Mike Lothian <mike@fireburn.co.uk> | 2025-10-23 18:03:21 +0100 |
| commit | 3785caf55f33f2df7bb3180e774f953cd40d06cb (patch) | |
| tree | 821d6fbe1c149ae22b2a4ef62697e91286c34fa3 | |
| parent | ae235df7eee6b8ae2b4400c037dd697814924d5d (diff) | |
CMakeLists: Fix build with Qt6.10
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9e489ba0..768c9cea6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -459,6 +459,11 @@ if (ENABLE_QT) if (UNIX AND NOT APPLE) find_package(Qt6 REQUIRED COMPONENTS DBus) + if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0) + # GuiPrivate is needed to #include qplatformnativeinterface.h in MainWindow.cpp with Qt 6.10+. + set(NEED_QT_GUI_PRIVATE_COMPONENT ON) + find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) + endif() endif() if (ENABLE_QT_TRANSLATION) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index a1a7f0f60..70f408e50 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -389,6 +389,9 @@ endif() if (UNIX AND NOT APPLE) target_link_libraries(yuzu PRIVATE Qt6::DBus) endif() +if (NEED_QT_GUI_PRIVATE_COMPONENT) + target_link_libraries(yuzu PRIVATE Qt6::GuiPrivate) +endif() target_compile_definitions(yuzu PRIVATE # Use QStringBuilder for string concatenation to reduce |
