diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-06-11 11:45:22 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-06-11 15:52:25 +0200 |
commit | 019a38fbaa0aa286e7152f2539053e7eff1c8142 (patch) | |
tree | 8d4d2bf40e3aaf36c14a44900d8926c94b7fe2be /cmake | |
parent | 39e229fe13a2112dcc5d033f4535fd019aab800b (diff) |
CMake: Don't add "d" suffix to MinGW debug libraries
To be in line with the qmake build we drop the "d" suffix for MinGW
debug libraries unless the debug_and_release feature is enabled.
Task-number: QTBUG-84781
Change-Id: I1b83492bff561d3d7647dde467931ec3866ae940
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index ee88ac8852..28b0ad62c4 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -34,7 +34,15 @@ endif() # Appends a 'debug postfix' to library targets (not executables) # e.g. lib/libQt6DBus_debug.5.12.0.dylib if(WIN32) - set(CMAKE_DEBUG_POSTFIX "d") + if(MINGW) + # On MinGW we don't have "d" suffix for debug libraries like on Linux, + # unless we're building debug and release libraries in one go. + if(FEATURE_debug_and_release) + set(CMAKE_DEBUG_POSTFIX "d") + endif() + else() + set(CMAKE_DEBUG_POSTFIX "d") + endif() elseif(APPLE) set(CMAKE_DEBUG_POSTFIX "_debug") set(CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG "_debug") |