Skip to content

Commit

Permalink
CMake: Fix DEBUG_POSTFIX to apply to macOS multi-config builds
Browse files Browse the repository at this point in the history
There was refactoring in 8c41125 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 8c41125

Pick-to: 6.5 6.7
Change-Id: Iae3f1050bb11805b4cce01ec491a13a3d6c0a9fc
Reviewed-by:  Alexey Edelev <[email protected]>
  • Loading branch information
alcroito committed May 22, 2024
1 parent b8b84b9 commit 6328aaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/QtTargetHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 6328aaa

Please sign in to comment.