skia2/third_party/vulkan/BUILD.gn

70 lines
1.7 KiB
Plaintext
Raw Normal View History

Reland "Move gn setup for vulkan library/headers into their own third_party directory." This reverts commit 2c2a119f945eedaced4bf081347a53f05cf0c39c. Reason for revert: Relanding with fixes Original change's description: > Revert "Move gn setup for vulkan library/headers into their own third_party directory." > > This reverts commit 477094250cd55a38d4d796ab6c50eb57bdba65e1. > > Reason for revert: > I think we know this broke the MoltenVK bots. It also appears to have broken the Fuchsia roll: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945885190914943680%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fgn_gen%2F0%2Fstdout > > Original change's description: > > Move gn setup for vulkan library/headers into their own third_party directory. > > > > Bug: skia: > > Change-Id: I4605f0d962271efb77bf3c17f1b0daaaddfb51c8 > > Reviewed-on: https://skia-review.googlesource.com/128540 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com > > Change-Id: I6e41d98e39883eff34424a2f352b0c8adec178db > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/129444 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> Bug: skia: Change-Id: I26b4b1f7196dd1bd8bf2e7641ef741c90c742c81 Reviewed-on: https://skia-review.googlesource.com/129445 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-22 17:25:15 +00:00
# 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) {
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"
}
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 (skia_moltenvk_path != "") {
configs += [ ":moltenvk" ]
}
}
source_set("vulkan") {
public_configs = [ ":vulkan_config" ]
}