From 6328aaadf9683089aaa3904ea1cec56012d6212e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 21 May 2024 17:15:04 +0200 Subject: [PATCH] CMake: Fix DEBUG_POSTFIX to apply to macOS multi-config builds There was refactoring in 8c41125118768ce037698e0605755128b2da705d to handle custom postfixes, which caused a regression in the postfix not being set for macOS frameworks. Specifically we set CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG to the value of ${${postfix_var}} but that variable was empty, because we only set it in the PARENT_SCOPE. Set the variable also in the current scope. Amends 8c41125118768ce037698e0605755128b2da705d Pick-to: 6.5 6.7 Change-Id: Iae3f1050bb11805b4cce01ec491a13a3d6c0a9fc Reviewed-by: Alexey Edelev --- cmake/QtTargetHelpers.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake index 3740e858039..d361a8096d1 100644 --- a/cmake/QtTargetHelpers.cmake +++ b/cmake/QtTargetHelpers.cmake @@ -479,6 +479,7 @@ function(qt_internal_setup_cmake_config_postfix) # If postfix is set by user avoid changing it, but save postfix variable that has # a non-default value for further warning. if("${${postfix_var}}" STREQUAL "") + set(${postfix_var} "${${default_postfix_var}}") set(${postfix_var} "${${default_postfix_var}}" PARENT_SCOPE) elseif(NOT "${${postfix_var}}" STREQUAL "${${default_postfix_var}}") list(APPEND custom_postfix_vars ${postfix_var})