Browse Source

Windows support for V8 5.5 and 5.6

Jan-E 8 years ago
parent
commit
11d331f535
1 changed files with 11 additions and 1 deletions
  1. 11 1
      config.w32

+ 11 - 1
config.w32

@@ -42,7 +42,17 @@ if (PHP_V8JS != "no") {
 		var v8api = v8major + v8js_zeroPad(v8minor, 3) + v8js_zeroPad(v8build, 3);
 		var v8ver = v8major + "." + v8minor + "." + v8build + "." + v8patch;
 
-		if (v8api >= 5002000) {
+		if (v8api >= 5005000) {
+			CHECK_LIB("v8.dll.lib", "v8js");
+			CHECK_LIB("v8_libplatform.dll.lib", "v8js");
+			CHECK_LIB("v8_libbase.dll.lib", "v8js");
+			ADD_FLAG("CFLAGS_V8JS", "/D BUILDING_V8_PLATFORM_SHARED");
+			// #define _STRING_ to disable #include <string> in v8-platform.h and avoid
+			// C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(671):
+			//   error C2143: syntax error: missing ';' before 'namespace'
+			//   (compiling source file ext\v8js\v8js_v8.cc)
+			ADD_FLAG("CFLAGS_V8JS", "/D _STRING_");
+		} else if (v8api >= 5002000) {
 			CHECK_LIB("v8.dll.lib", "v8js");
 			// created by 'cd obj\v8_libplatform && lib /out:v8_libplatform.lib *.obj'
 			CHECK_LIB("v8_libplatform.lib", "v8js");