From c33427240f1e7e99a36d4c8fff19975ebe508839 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 12 May 2023 16:23:15 +0200 Subject: [PATCH] Make sure that -utf-8 flag only apply to MSVC INTERFACE scope propagates the '-utf-8' flag to the target dependencies. So if Qt is built using MSVC, but the depending targets use different compiler this flag will break the compilation. Guard the flag using genex. Amends e3cc2487ce63cae42d8054b38fdb54abe8545007 Pick-to: 6.5 Task-number: QTBUG-112737 Change-Id: Ie0576667108820dd61035debfc1fcc030ef3536a Reviewed-by: Lars Schmertmann Reviewed-by: Joerg Bornemann --- cmake/QtFlagHandlingHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index fa478137926..096922b14c1 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -288,7 +288,7 @@ endfunction() function(qt_enable_utf8_sources target) set(utf8_flags "") if(MSVC) - list(APPEND utf8_flags "-utf-8") + list(APPEND utf8_flags "$<$:-utf-8>") endif() if(utf8_flags)