From 019a38fbaa0aa286e7152f2539053e7eff1c8142 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 11 Jun 2020 11:45:22 +0200 Subject: 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 Reviewed-by: Alexandru Croitor --- cmake/QtSetup.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmake') 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") -- cgit v1.2.3