aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/vulkan
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-05-22 16:33:53 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-22 21:04:45 +0000
commit4b6d4d0eccb1d2bc30fc69e98c342eb7cbf1710d (patch)
treee95b9fc0b2dd325e5818c623d6de9c05ac5ed874 /third_party/vulkan
parente87225f12a438c15667d9960ebb8ad9d4252f08b (diff)
MoltenVk fix for fuchsia again.
Bug: skia: Change-Id: I57365b69c4c764079512dce9e6d1bb624a199d1f Reviewed-on: https://skia-review.googlesource.com/129449 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'third_party/vulkan')
-rw-r--r--third_party/vulkan/BUILD.gn52
1 files changed, 28 insertions, 24 deletions
diff --git a/third_party/vulkan/BUILD.gn b/third_party/vulkan/BUILD.gn
index 425ccdabcb..efad8f08e9 100644
--- a/third_party/vulkan/BUILD.gn
+++ b/third_party/vulkan/BUILD.gn
@@ -15,34 +15,38 @@ declare_args() {
if (is_fuchsia) {
skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include"
} else if (is_linux || is_win) {
- skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
+ if (defined(skia_vulkan_sdk) && skia_vulkan_sdk != "") {
+ skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
+ }
}
}
config("moltenvk") {
- if (is_ios) {
- moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/iOS"
- } else {
- moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/macOS"
+ if (defined(skia_moltenvk_path) && skia_moltenvk_path != "") {
+ if (is_ios) {
+ moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/iOS"
+ } else {
+ moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/macOS"
+ }
+ cflags = [
+ "-F$moltenvk_framework_path",
+ "-isystem$skia_moltenvk_path/MoltenVK/include", # for <vulkan/vulkan.h>
+ ]
+ ldflags = [ "-F$moltenvk_framework_path" ]
+ libs = [
+ "MoltenVK.framework",
+ "Metal.framework",
+ "IOSurface.framework",
+ "QuartzCore.framework",
+ "Foundation.framework",
+ ]
+ if (is_ios) {
+ libs += [ "UIKit.framework" ]
+ } else {
+ libs += [ "IOKit.framework" ]
+ }
+ defines = [ "SK_MOLTENVK" ]
}
- cflags = [
- "-F$moltenvk_framework_path",
- "-isystem$skia_moltenvk_path/MoltenVK/include", # for <vulkan/vulkan.h>
- ]
- ldflags = [ "-F$moltenvk_framework_path" ]
- libs = [
- "MoltenVK.framework",
- "Metal.framework",
- "IOSurface.framework",
- "QuartzCore.framework",
- "Foundation.framework",
- ]
- if (is_ios) {
- libs += [ "UIKit.framework" ]
- } else {
- libs += [ "IOKit.framework" ]
- }
- defines = [ "SK_MOLTENVK" ]
}
config("vulkan_config") {
@@ -59,7 +63,7 @@ config("vulkan_config") {
!is_official_build) {
defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ]
}
- if (skia_moltenvk_path != "") {
+ if (defined(skia_moltenvk_path) && skia_moltenvk_path != "") {
configs += [ ":moltenvk" ]
}
}