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>
This commit is contained in:
parent
2e36e88f40
commit
789e25ea7d
13
BUILD.gn
13
BUILD.gn
@ -27,8 +27,11 @@ declare_args() {
|
|||||||
skia_enable_gpu = true
|
skia_enable_gpu = true
|
||||||
skia_enable_tools = is_skia_standalone
|
skia_enable_tools = is_skia_standalone
|
||||||
skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug
|
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).
|
# Our tools require static linking (they use non-exported symbols).
|
||||||
skia_enable_tools = skia_enable_tools && !is_component_build
|
skia_enable_tools = skia_enable_tools && !is_component_build
|
||||||
|
|
||||||
@ -107,6 +110,15 @@ config("skia_private") {
|
|||||||
# TODO(bsalomon): it'd be nice to make Android normal.
|
# TODO(bsalomon): it'd be nice to make Android normal.
|
||||||
defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
|
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.
|
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
|
||||||
@ -345,7 +357,6 @@ optional("gpu") {
|
|||||||
if (skia_use_vulkan) {
|
if (skia_use_vulkan) {
|
||||||
public_defines += [ "SK_VULKAN" ]
|
public_defines += [ "SK_VULKAN" ]
|
||||||
sources += skia_vk_sources
|
sources += skia_vk_sources
|
||||||
libs += [ "vulkan" ]
|
|
||||||
if (skia_enable_vulkan_debug_layers) {
|
if (skia_enable_vulkan_debug_layers) {
|
||||||
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
|
public_defines += [ "SK_ENABLE_VK_LAYERS" ]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user