Selaa lähdekoodia

Fixed shaderc Linux build.

Branimir Karadzic 13 vuotta sitten
vanhempi
sitoutus
055891a42d
2 muutettua tiedostoa jossa 14 lisäystä ja 6 poistoa
  1. 11 6
      premake/shaderc.lua
  2. 3 0
      tools/shaderc.cpp

+ 11 - 6
premake/shaderc.lua

@@ -10,6 +10,17 @@ project "shaderc"
 			GLSL_OPTIMIZER .. "src/glsl/msvc",
 		}
 
+	configuration { "windows" }
+		includedirs {
+			GLSL_OPTIMIZER .. "include/c99",
+		}
+
+		links {
+			"d3dx9",
+			"d3dcompiler",
+			"dxguid",
+		}
+
 	configuration {}
 
 	includedirs {
@@ -18,7 +29,6 @@ project "shaderc"
 		FCPP_DIR,
 
 		GLSL_OPTIMIZER .. "include",
-		GLSL_OPTIMIZER .. "include/c99",
 		GLSL_OPTIMIZER .. "src/mesa",
 		GLSL_OPTIMIZER .. "src/mapi",
 		GLSL_OPTIMIZER .. "src/glsl",
@@ -50,8 +60,3 @@ project "shaderc"
 		GLSL_OPTIMIZER .. "src/glsl/builtin_stubs.cpp",
 	}
 
-	links {
-		"d3dx9",
-		"d3dcompiler",
-		"dxguid",
-	}

+ 3 - 0
tools/shaderc.cpp

@@ -29,7 +29,10 @@ extern "C"
 #include <bx/bx.h>
 
 #if BX_PLATFORM_LINUX
+#	include <stdarg.h>
+
 #	define _stricmp strcasecmp
+#	define _snprintf snprintf
 #endif // BX_PLATFORM_LINUX
 
 #include <bx/commandline.h>