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 <alexey.edelev@qt.io>
This commit is contained in:
Alexandru Croitor 2024-05-21 17:15:04 +02:00
parent b8b84b9d91
commit 6328aaadf9

View File

@ -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})