diff --git a/cmake/WinDeployQt.cmake b/cmake/WinDeployQt.cmake index cad0c194b..ec62ec482 100644 --- a/cmake/WinDeployQt.cmake +++ b/cmake/WinDeployQt.cmake @@ -15,12 +15,17 @@ function(WinDeployQt) if(NOT _deploy_TARGET) message(FATAL_ERROR "A TARGET must be specified") endif() - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - list(APPEND _ARGS --debug) - elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - list(APPEND _ARGS --release-with-debug-info) - elseif(CMAKE_BUILD_TYPE STREQUAL "Release") - list(APPEND _ARGS --release) + if(CMAKE_GENERATOR STREQUAL "MinGW Makefiles") + # These flags no longer work in MinGW builds, disable for now + message(VERBOSE "Disabling windeployqt release/debug options - QTBUG-62103") + else() + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + list(APPEND _ARGS --debug) + elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") + list(APPEND _ARGS --release-with-debug-info) + elseif(CMAKE_BUILD_TYPE STREQUAL "Release") + list(APPEND _ARGS --release) + endif() endif() if(_deploy_COMPILER_RUNTIME) list(APPEND _ARGS --compiler-runtime)