Add gn option to set the location of the Vulkan SDK

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2848

Change-Id: I0b60ae03d7b155d4f9a581cab6b551e152b03a86
Reviewed-on: https://skia-review.googlesource.com/2848
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index c138492..3a81d36 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -27,8 +27,11 @@
   skia_enable_gpu = true
   skia_enable_tools = is_skia_standalone
   skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug
+  skia_vulkan_sdk = ""
 }
 
+skia_use_vulkan = skia_use_vulkan || skia_vulkan_sdk != ""
+
 # Our tools require static linking (they use non-exported symbols).
 skia_enable_tools = skia_enable_tools && !is_component_build
 
@@ -107,6 +110,15 @@
     # TODO(bsalomon): it'd be nice to make Android normal.
     defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
   }
+  libs = []
+  lib_dirs = []
+  if (skia_use_vulkan) {
+    if (skia_vulkan_sdk != "") {
+      include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
+      lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
+    }
+    libs += [ "vulkan" ]
+  }
 }
 
 # Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
@@ -345,7 +357,6 @@
   if (skia_use_vulkan) {
     public_defines += [ "SK_VULKAN" ]
     sources += skia_vk_sources
-    libs += [ "vulkan" ]
     if (skia_enable_vulkan_debug_layers) {
       public_defines += [ "SK_ENABLE_VK_LAYERS" ]
     }