瀏覽代碼

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

Sam Lantinga 3 年之前
父節點
當前提交
0c19602118
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      CMakeLists.txt

+ 5 - 0
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)