diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in index 4a9f72a049b..9436ae04cf7 100644 --- a/src/corelib/Qt6CoreConfigExtras.cmake.in +++ b/src/corelib/Qt6CoreConfigExtras.cmake.in @@ -32,6 +32,7 @@ list(REMOVE_DUPLICATES CMAKE_AUTOMOC_MACRO_NAMES) include("${CMAKE_CURRENT_LIST_DIR}/QtInstallPaths.cmake") set(QT@PROJECT_VERSION_MAJOR@_IS_SHARED_LIBS_BUILD "@BUILD_SHARED_LIBS@") +set(QT@PROJECT_VERSION_MAJOR@_DEBUG_POSTFIX "@CMAKE_DEBUG_POSTFIX@") set(_Qt6CTestMacros "${CMAKE_CURRENT_LIST_DIR}/Qt6CTestMacros.cmake") diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 5bc313a276d..d9789c2ae00 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -2591,6 +2591,18 @@ function(_qt_internal_setup_deploy_support) set(__QT_DEPLOY_TOOL "") endif() + # Determine whether this is a multi-config build with a Debug configuration. + set(is_multi_config_build_with_debug_config FALSE) + get_target_property(target_is_imported ${target} IMPORTED) + if(target_is_imported) + get_target_property(target_imported_configs ${target} IMPORTED_CONFIGURATIONS) + list(LENGTH target_imported_configs target_imported_configs_length) + if(target_imported_configs_length GREATER "1" + AND "DEBUG" IN_LIST target_imported_configs) + set(is_multi_config_build_with_debug_config TRUE) + endif() + endif() + _qt_internal_add_deploy_support("${CMAKE_CURRENT_LIST_DIR}/Qt6CoreDeploySupport.cmake") set(deploy_ignored_lib_dirs "") @@ -2688,6 +2700,8 @@ set(__QT_DEPLOY_PLUGINS \"\") set(__QT_DEPLOY_MUST_ADJUST_PLUGINS_RPATH \"${must_adjust_plugins_rpath}\") set(__QT_DEPLOY_USE_PATCHELF \"${QT_DEPLOY_USE_PATCHELF}\") set(__QT_DEPLOY_PATCHELF_EXECUTABLE \"${QT_DEPLOY_PATCHELF_EXECUTABLE}\") +set(__QT_DEPLOY_QT_IS_MULTI_CONFIG_BUILD_WITH_DEBUG \"${is_multi_config_build_with_debug_config}\") +set(__QT_DEPLOY_QT_DEBUG_POSTFIX \"${QT6_DEBUG_POSTFIX}\") # Define the CMake commands to be made available during deployment. set(__qt_deploy_support_files