diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c0bfc9c412c..6763e7a9fa7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,8 +350,8 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only) if (MSVC AND FMT_UNICODE) # 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)