From 4297918ce24a1e53864c86a7f4c617e4da42d806 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 6 Dec 2025 12:50:33 +0100 Subject: [PATCH] cmake: remove Qt6::GuiPrivate dependency on WIN32 and APPLE --- cmake/SearchForStuff.cmake | 6 ++++-- pcsx2-qt/CMakeLists.txt | 5 ++++- pcsx2-qt/DisplayWidget.cpp | 2 -- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 614778545e..6422a83b7c 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -110,8 +110,10 @@ disable_compiler_warnings_for_target(speex) if(ENABLE_QT_UI) find_package(Qt6 6.10.0 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED) - if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0) - find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) + if(NOT WIN32 AND NOT APPLE) + if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0) + find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) + endif() endif() # The docking system for the debugger. diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index dd639a0504..b0135b07bc 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -289,11 +289,14 @@ target_link_libraries(pcsx2-qt PRIVATE PCSX2 Qt6::Core Qt6::Gui - Qt6::GuiPrivate Qt6::Widgets KDAB::kddockwidgets ) +if(NOT WIN32 AND NOT APPLE) + target_link_libraries(pcsx2-qt PRIVATE Qt6::GuiPrivate) +endif() + # Our Qt builds may have exceptions on, so force them off. target_compile_definitions(pcsx2-qt PRIVATE QT_NO_EXCEPTIONS) diff --git a/pcsx2-qt/DisplayWidget.cpp b/pcsx2-qt/DisplayWidget.cpp index 691f93d8a2..a966f6c55e 100644 --- a/pcsx2-qt/DisplayWidget.cpp +++ b/pcsx2-qt/DisplayWidget.cpp @@ -26,8 +26,6 @@ #if defined(_WIN32) #include "common/RedtapeWindows.h" -#elif !defined(APPLE) -#include #endif DisplaySurface::DisplaySurface()