diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-03-26 19:37:01 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-04-02 13:32:38 +0000 |
commit | 15f5a347fe0010f640b5451804ecb96c23bcf4a3 (patch) | |
tree | d0bb573bc119e6eb480c9740a6f6e5bc0baeb8e4 /cmake/QtSetup.cmake | |
parent | e2e4525f7841d95c531218297ef0d57b6280aa3d (diff) |
Add a debug suffix to libraries and plugins on macOS and Windows
This is especially important on macOS when doing a debug build,
because QPluginLoader is looking for the cocoa QPA plugin
suffixed with "_debug" when executing a test or example.
Change-Id: Ief23b3a82c567c16ab9dd30d04d1729031262d7d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index caf908b4c9..c7d6f50b73 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -10,6 +10,14 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") # Set the possible values of build type for cmake-gui endif() +# Appends a 'debug postfix' to library targets (not executables) +# e.g. lib/libQt5DBus_debug.5.12.0.dylib +if(WIN32) + set(CMAKE_DEBUG_POSTFIX "d") +elseif(APPLE) + set(CMAKE_DEBUG_POSTFIX "_debug") +endif() + ## Force C++ standard, do not fall back, do not use compiler extensions set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) |