فهرست منبع

Fixed VS build.

Branimir Karadžić 9 سال پیش
والد
کامیت
99415e419b
2فایلهای تغییر یافته به همراه21 افزوده شده و 5 حذف شده
  1. 0 2
      3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
  2. 21 3
      scripts/shaderc.lua

+ 0 - 2
3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp

@@ -79,9 +79,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 // cpp.c
 //
 
-#ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
-#endif // _CRT_SECURE_NO_WARNINGS
 
 #include <sstream>
 #include <cstdlib>

+ 21 - 3
scripts/shaderc.lua

@@ -6,6 +6,11 @@
 project "glslang"
 	kind "StaticLib"
 
+	configuration { "vs*" }
+		buildoptions {
+			"/wd4005", -- warning C4005: '_CRT_SECURE_NO_WARNINGS': macro redefinition
+		}
+
 	configuration { "not vs*" }
 		buildoptions {
 			"-Wno-ignored-qualifiers",
@@ -55,12 +60,25 @@ project "glslang"
 	}
 
 	removefiles {
-		"../3rdparty/glslang/glslang/OSDependent/Windows/**.cpp",
-		"../3rdparty/glslang/glslang/OSDependent/Windows/**.h",
-
 		"../3rdparty/glsl-parser/main.cpp",
+		"../3rdparty/glslang/glslang/OSDependent/Unix/main.cpp",
+		"../3rdparty/glslang/glslang/OSDependent/Windows/main.cpp",
 	}
 
+	configuration { "windows" }
+		removefiles {
+			"../3rdparty/glslang/glslang/OSDependent/Unix/**.cpp",
+			"../3rdparty/glslang/glslang/OSDependent/Unix/**.h",
+		}
+
+	configuration { "not windows" }
+		removefiles {
+			"../3rdparty/glslang/glslang/OSDependent/Windows/**.cpp",
+			"../3rdparty/glslang/glslang/OSDependent/Windows/**.h",
+		}
+
+	configuration {}
+
 project "shaderc"
 	kind "ConsoleApp"