diff --git a/CMakeLists.txt b/CMakeLists.txt index 89ed7520a58e..1fe3af5c643e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,8 +347,8 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only) if (MSVC) # Unicode support requires compiling with /utf-8. - target_compile_options(fmt PUBLIC /utf-8) - target_compile_options(fmt-header-only INTERFACE /utf-8) + target_compile_options(fmt PUBLIC $<$:/utf-8>) + target_compile_options(fmt-header-only INTERFACE $<$:/utf-8>) endif () target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)