Skip to content

Commit

Permalink
Disable windeployqt release/debug flags for Mingw builds
Browse files Browse the repository at this point in the history
These flags are not working for MinGW builds,

    https://bugreports.qt.io/browse/QTBUG-62103

for now disable them for the MinGW Makefiles generator.
  • Loading branch information
jgehrig committed Sep 6, 2020
1 parent 8e84f17 commit 91be004
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cmake/WinDeployQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 91be004

Please sign in to comment.