From 6f475a05a1a035b07ed66f93aa92d0e8b2396047 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 14 Jun 2024 19:04:44 +0200 Subject: [PATCH] CMake: Fix _qt_internal_forward_function_args to evaluate its args We were comparing the variable name of single and multi arg options, rather than the value. This accidentally worked when the variables were set, but forwarding empty values if the variables were not set. Explicitly evaluate the variable values to compare them against the empty string. Amends 96abceb64e5dc0570ca7c3419f401cfafe946ba0 Pick-to: 6.8 Change-Id: I1a701c681f5af5e665601972687024ce734aa014 Reviewed-by: Alexey Edelev --- cmake/QtPublicCMakeHelpers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtPublicCMakeHelpers.cmake b/cmake/QtPublicCMakeHelpers.cmake index bb4601d81db..643a0d2926b 100644 --- a/cmake/QtPublicCMakeHelpers.cmake +++ b/cmake/QtPublicCMakeHelpers.cmake @@ -645,13 +645,13 @@ function(_qt_internal_forward_function_args) endforeach() foreach(option_name IN LISTS arg_FORWARD_SINGLE) - if(NOT "${arg_FORWARD_PREFIX}_${option_name}" STREQUAL "") + if(NOT "${${arg_FORWARD_PREFIX}_${option_name}}" STREQUAL "") list(APPEND forward_args "${option_name}" "${${arg_FORWARD_PREFIX}_${option_name}}") endif() endforeach() foreach(option_name IN LISTS arg_FORWARD_MULTI) - if(NOT "${arg_FORWARD_PREFIX}_${option_name}" STREQUAL "") + if(NOT "${${arg_FORWARD_PREFIX}_${option_name}}" STREQUAL "") list(APPEND forward_args "${option_name}" ${${arg_FORWARD_PREFIX}_${option_name}}) endif() endforeach()