ref: 505c9cc8f539d88e56d7b99fcebeb333deb9a2bb
parent: 1dccec0e31b8b11fe8f88bc075713d609fa7b4a9
author: Clownacy <[email protected]>
date: Sat Mar 14 15:30:57 EDT 2020
Clean-up MSVC tweaks
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -383,11 +383,13 @@
# 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)