Privately include our version of vulkan header file in all our src files.
This should allow clients to include Skia and their vulkan files in any
order. However, it does require that when clients are building their
files that include skia with vulkan, they must have vulkan/vulkan_core.h
on their include path somewhere.
Bug: skia:
Change-Id: I969db396c92127be7c8df754926d175f38b8aafa
Reviewed-on: https://skia-review.googlesource.com/c/172147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 9cf1ca8..ee980ad 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -51,7 +51,6 @@
skia_enable_skpicture = true
skia_enable_tools = is_skia_dev_build
skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
- skia_vulkan_header = "" # temporary as we remove the use from clients
skia_qt_path = getenv("QT_PATH")
skia_compile_processors = false
skia_generate_workarounds = false
@@ -187,6 +186,7 @@
if (skia_enable_gpu) {
include_dirs += [ "src/gpu" ]
if (is_skia_dev_build && skia_use_vulkan) {
+ include_dirs += [ "third_party/vulkan" ]
include_dirs += [ "tools/gpu/vk" ]
}
}
@@ -1150,6 +1150,10 @@
":skia.h",
"modules/skottie",
]
+
+ # We add this directory to simulate the client already have
+ # vulkan/vulkan_core.h on their path.
+ include_dirs = [ "third_party/vulkan" ]
}
template("test_lib") {