Browse Source

cmake: Add _CRT_SECURE_NO_WARNINGS to all projects

This prevents issues with using standard C functions, where microsoft
would otherwise spit out pointless warnings to encourage using
microsoft-specific functions instead.
jp9000 9 years ago
parent
commit
ca607f8b35

+ 1 - 1
CMakeLists.txt

@@ -60,7 +60,7 @@ elseif(MSVC)
 endif()
 
 if(WIN32)
-	add_definitions(-DUNICODE -D_UNICODE)
+	add_definitions(-DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
 endif()
 
 if(MSVC)

+ 0 - 1
plugins/win-capture/get-graphics-offsets/d3d8-offsets.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <stdio.h>
 #include <windows.h>
 #include "../d3d8-api/d3d8.h"

+ 0 - 1
plugins/win-capture/get-graphics-offsets/d3d9-offsets.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <stdio.h>
 #include <windows.h>
 #include <d3d9.h>

+ 0 - 1
plugins/win-capture/get-graphics-offsets/dxgi-offsets.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <windows.h>
 #include <d3d10.h>
 #include <dxgi.h>

+ 0 - 1
plugins/win-capture/get-graphics-offsets/get-graphics-offsets.c

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <inttypes.h>
 #include <stdio.h>
 #include <windows.h>

+ 0 - 1
plugins/win-capture/graphics-hook/d3d10-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <d3d10.h>
 #include <dxgi.h>
 

+ 0 - 1
plugins/win-capture/graphics-hook/d3d11-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <d3d11.h>
 #include <dxgi.h>
 

+ 0 - 1
plugins/win-capture/graphics-hook/d3d12-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <windows.h>
 #include "graphics-hook.h"
 

+ 0 - 1
plugins/win-capture/graphics-hook/d3d8-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <dxgi.h>
 
 #include "../d3d8-api/d3d8.h"

+ 0 - 1
plugins/win-capture/graphics-hook/d3d9-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <d3d9.h>
 #include <d3d11.h>
 #include <dxgi.h>

+ 0 - 1
plugins/win-capture/graphics-hook/dxgi-capture.cpp

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <d3d10_1.h>
 #include <d3d11.h>
 #include <dxgi.h>

+ 0 - 2
plugins/win-capture/graphics-hook/gl-capture.c

@@ -1,5 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
-
 #ifdef _MSC_VER
 #pragma warning(disable : 4214) /* nonstandard extension, non-int bitfield */
 #pragma warning(disable : 4054) /* function pointer to data pointer */

+ 0 - 1
plugins/win-capture/graphics-hook/graphics-hook.c

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <windows.h>
 #include <psapi.h>
 #include "graphics-hook.h"

+ 0 - 2
plugins/win-capture/inject-helper/inject-helper.c

@@ -1,5 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <wchar.h>

+ 0 - 1
plugins/win-capture/load-graphics-offsets.c

@@ -1,4 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
 #include <obs-module.h>
 #include <util/windows/win-version.h>
 #include <util/platform.h>

+ 0 - 2
plugins/win-capture/obfuscate.c

@@ -1,5 +1,3 @@
-#define _CRT_SECURE_NO_WARNINGS
-
 #ifdef _MSC_VER
 #pragma warning(disable : 4152) /* casting func ptr to void */
 #endif