From b3bdad416ca0a6a604dca12bed7bd00542092d25 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sun, 12 Oct 2025 22:55:52 -0500 Subject: [PATCH] CMakeLists: Fix build with Qt6.10. GuiPrivate component is needed to #include qplatformnativeinterface.h in MainWindow.cpp. --- Source/Core/DolphinQt/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index 47df65334bd4..656537f71971 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -15,6 +15,13 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Svg) + +if (LINUX AND 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() + message(STATUS "Found Qt version ${Qt6_VERSION}") set_property(TARGET Qt6::Core PROPERTY INTERFACE_COMPILE_FEATURES "") @@ -440,6 +447,13 @@ PRIVATE implot ) +if (NEED_QT_GUI_PRIVATE_COMPONENT) + target_link_libraries(dolphin-emu + PRIVATE + Qt6::GuiPrivate + ) +endif() + if (WIN32) target_link_libraries(dolphin-emu PRIVATE