From dca41751f7454a5db29973569114e02e51587b95 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 25 Jul 2024 18:57:01 +0200 Subject: [PATCH] Qt6: Fix MinGW build --- src/Gui/CMakeLists.txt | 15 ++++++++------- src/Gui/MainWindow.cpp | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 93fd4262a0..04dda813d1 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -70,13 +70,6 @@ if(MSVC) ${OPENGL_gl_LIBRARY} ) - if(FREECAD_QT_MAJOR_VERSION EQUAL 6) - list(APPEND FreeCADGui_LIBS - Qt6::GuiPrivate - ) - endif() - - if(FREECAD_USE_3DCONNEXION) list(APPEND FreeCADGui_LIBS hid @@ -93,6 +86,14 @@ else(MSVC) ) endif(MSVC) +if (WIN32) + if(FREECAD_QT_MAJOR_VERSION EQUAL 6) + list(APPEND FreeCADGui_LIBS + Qt6::GuiPrivate + ) + endif() +endif() + include_directories( ${QtCore_INCLUDE_DIRS} ${QtWidgets_INCLUDE_DIRS} diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index cab7f03451..74ea6a995c 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -52,6 +52,7 @@ # include # include # include +# include # include #endif