Commit 0c19602118a54f36979dc00d262c604130f9a43f

Sam Lantinga 2022-05-06T07:59:36

Applied 0004-Define-crt-macros.patch.txt from vcpkg ports

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff430ab..a4a736f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -627,6 +627,11 @@ if(USE_GCC OR USE_CLANG)
     endif()
   endif()
 endif()
+if(MSVC)
+  target_compile_definitions(sdl-build-options INTERFACE "-D_CRT_SECURE_NO_DEPRECATE")
+  target_compile_definitions(sdl-build-options INTERFACE "-D_CRT_NONSTDC_NO_DEPRECATE")
+  target_compile_definitions(sdl-build-options INTERFACE "-D_CRT_SECURE_NO_WARNINGS")
+endif()
 
 if(SDL_ASSEMBLY)
   if(USE_GCC OR USE_CLANG)