--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -300,7 +303,7 @@
         BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 
-if (UNIX)
+if (UNIX OR MINGW)
     # Install desktop files, completion and dbus files
     configure_file(${CMAKE_SOURCE_DIR}/data/desktopEntry/package/org.flameshot.Flameshot.desktop
             ${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop @ONLY)
@@ -355,7 +358,7 @@
 endif ()
 
 # windeployqt
-if (WIN32)
+if (WIN32 AND NOT MINGW)
     if (EXISTS $ENV{QTDIR}/bin/windeployqt.exe)
         if (CMAKE_BUILD_TYPE MATCHES Release)
             set(BINARIES_TYPE --release)
