Support vs2017.

Change-Id: Icb333d34705c86f6204a5265b645a2a215e60ad6
Reviewed-on: https://skia-review.googlesource.com/9624
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 36c881c..0ee9d39 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -20,7 +20,7 @@
     }
   }
 
-  windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
+  msvc = 2015
 
   extra_cflags = []
   extra_cflags_c = []
@@ -30,6 +30,13 @@
   cc_wrapper = ""
   malloc = ""
 }
+declare_args() {
+  if (msvc == 2015) {
+    windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
+  } else {
+    windk = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"
+  }
+}
 
 if (host_os == "win") {
   python = "python.bat"
@@ -87,11 +94,22 @@
       "NOMINMAX",
     ]
     include_dirs = [
+      #2017
+      "$windk/VC/Tools/MSVC/14.10.25017/include",
+
+      #2015
       "$windk/VC/include",
 
       # For local builds.
-      "$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
+      # 2017
+      "$windk/../../../Windows Kits/10/Include/10.0.14393.0/shared",
+      "$windk/../../../Windows Kits/10/Include/10.0.14393.0/ucrt",
+      "$windk/../../../Windows Kits/10/Include/10.0.14393.0/um",
+      "$windk/../../../Windows Kits/10/Include/10.0.14393.0/winrt",
+
+      # 2015
       "$windk/../Windows Kits/8.1/Include/shared",
+      "$windk/../Windows Kits/10/Include/10.0.10150.0/ucrt",
       "$windk/../Windows Kits/8.1/Include/um",
       "$windk/../Windows Kits/8.1/Include/winrt",
 
@@ -103,6 +121,11 @@
     ]
     lib_dirs = [
       # For local builds.
+      # 2017
+      "$windk/../../../Windows Kits/10/Lib/10.0.14393.0/ucrt/$target_cpu",
+      "$windk/../../../Windows Kits/10/Lib/10.0.14393.0/um/$target_cpu",
+
+      #2015
       "$windk/../Windows Kits/10/Lib/10.0.10150.0/ucrt/$target_cpu",
       "$windk/../Windows Kits/8.1/Lib/winv6.3/um/$target_cpu",
 
@@ -110,6 +133,11 @@
       "$windk/win_sdk/Lib/10.0.14393.0/ucrt/$target_cpu",
       "$windk/win_sdk/Lib/10.0.14393.0/um/$target_cpu",
     ]
+
+    #2017
+    lib_dirs += [ "$windk/VC/Tools/MSVC/14.10.25017/lib/$target_cpu" ]
+
+    #2015
     if (target_cpu == "x86") {
       lib_dirs += [ "$windk/VC/lib" ]
     } else {
@@ -449,11 +477,21 @@
 toolchain("msvc") {
   lib_dir_switch = "/LIBPATH:"
 
-  bin = "$windk/VC/bin/amd64"
-  env_setup = ""
-  if (target_cpu == "x86") {
-    bin += "_x86"
-    env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
+  if (msvc == 2015) {
+    bin = "$windk/VC/bin/amd64"
+    env_setup = ""
+    if (target_cpu == "x86") {
+      bin += "_x86"
+      env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
+    }
+  } else {
+    bin = "$windk/VC/Tools/MSVC/14.10.25017/bin/HostX64/$target_cpu"
+    env_setup = ""
+    if (target_cpu == "x86") {
+      print("Be sure to run")
+      print("$windk/VC/Auxiliary/Build/vcvarsall.bat amd64_x86")
+      print("to set up your environment before running ninja.")
+    }
   }
 
   tool("asm") {