MSVC: Fix compiling with some system languages

Report from @cyaoeu that compiling failed for Japanese system language.
This commit is contained in:
Campbell Barton 2017-12-10 15:12:31 +11:00
parent e6838ecc26
commit c568985118
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,11 @@ macro(find_package_wrapper)
endmacro()
add_definitions(-DWIN32)
# Needed, otherwise system encoding causes utf-8 encoding to fail in some cases (C4819)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
# Minimum MSVC Version
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
if(MSVC_VERSION EQUAL 1800)