4b6d4d0ecc
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>
74 lines
1.9 KiB
Plaintext
74 lines
1.9 KiB
Plaintext
# Copyright 2018 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
if (is_fuchsia) {
|
|
import("//build/vulkan/config.gni")
|
|
}
|
|
|
|
declare_args() {
|
|
skia_vulkan_header = ""
|
|
skia_tools_vulkan_header_dir = ""
|
|
|
|
# When buliding on Android we get the header via the NDK so no need for any extra path.
|
|
if (is_fuchsia) {
|
|
skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include"
|
|
} else if (is_linux || is_win) {
|
|
if (defined(skia_vulkan_sdk) && skia_vulkan_sdk != "") {
|
|
skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
|
|
}
|
|
}
|
|
}
|
|
|
|
config("moltenvk") {
|
|
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" ]
|
|
}
|
|
}
|
|
|
|
config("vulkan_config") {
|
|
include_dirs = []
|
|
configs = []
|
|
|
|
if (skia_tools_vulkan_header_dir != "") {
|
|
include_dirs += [ skia_tools_vulkan_header_dir ]
|
|
}
|
|
defines = [ "SK_VULKAN" ]
|
|
if (skia_vulkan_header != "") {
|
|
defines += [ "SK_VULKAN_HEADER=\"$skia_vulkan_header\"" ]
|
|
} else if (defined(is_skia_standalone) && is_skia_standalone &&
|
|
!is_official_build) {
|
|
defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ]
|
|
}
|
|
if (defined(skia_moltenvk_path) && skia_moltenvk_path != "") {
|
|
configs += [ ":moltenvk" ]
|
|
}
|
|
}
|
|
|
|
source_set("vulkan") {
|
|
public_configs = [ ":vulkan_config" ]
|
|
}
|