diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 93fd4262a0c1..04dda813d183 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 cab7f03451d3..74ea6a995c3f 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -52,6 +52,7 @@ # include # include # include +# include # include #endif