CMake: Store info about the debug build in QtDeploySupport.cmake
Application deployment must know whether the Qt installation is a debug_and_release build - or more generally, a multi-config build with a debug configuration. Store the following information in QtDeploySupport.cmake that's read at installation time: - whether Qt was built multi-config with a debug configuration - the postfix for debug libraries Task-number: QTBUG-109444 Pick-to: 6.5 6.6 Change-Id: I96a2120ba1a2b03125661cc829498653e37dfb0f Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
4abd6172f5
commit
266c2d23ae
@ -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")
|
||||
|
||||
|
@ -2788,6 +2788,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 "")
|
||||
@ -2885,6 +2897,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
|
||||
|
Loading…
Reference in New Issue
Block a user