Clean-up MSVC tweaks

This commit is contained in:
Clownacy 2020-03-14 19:30:57 +00:00
parent 1dccec0e31
commit 505c9cc8f5

View file

@ -383,11 +383,13 @@ endif()
# Make some tweaks if we're using MSVC
if(MSVC)
target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable warnings that normally fire up on MSVC when using "unsafe" functions instead of using MSVC's "safe" _s functions
# Disable warnings that normally fire up on MSVC when using "unsafe" functions instead of using MSVC's "safe" _s functions
target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS)
# Make it so source files are recognized as UTF-8 by MSVC
target_compile_options(CSE2 PRIVATE "/utf-8")
endif()
# Make it so source files are recognized as UTF-8 by MSVC
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
# Build bin2h externally, so it isn't cross-compiled when CSE2 is (Emscripten, cross-GCC, MinGW on Linux, etc.)
include(ExternalProject)