cmake: Don't reference global data in qt_internal_get_title_case

The only place the function was used was to generate the title case of
a target, so the issue wasn't spotted until now.

Pick-to: 6.2 6.3 6.4
Change-Id: Iee66ecea569e7411c6b5a5e5312cde910a48fa01
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2022-07-08 11:48:51 +02:00
parent ade2df4c4b
commit 3ad0f755f5

View File

@ -75,7 +75,7 @@ function(qt_internal_get_title_case value out_var)
endif()
string(SUBSTRING "${value}" 0 1 first_char)
string(TOUPPER "${first_char}" first_char_upper)
string(SUBSTRING "${target}" 1 -1 rest_of_value)
string(SUBSTRING "${value}" 1 -1 rest_of_value)
set(title_value "${first_char_upper}${rest_of_value}")
set(${out_var} "${title_value}" PARENT_SCOPE)
endfunction()