| Index: ui/vulkan/BUILD.gn
|
| diff --git a/ui/vulkan/BUILD.gn b/ui/vulkan/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..71d20016c6f4db0b33879a1bdef1b4556ba33b24
|
| --- /dev/null
|
| +++ b/ui/vulkan/BUILD.gn
|
| @@ -0,0 +1,48 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import("//build/config/ui.gni")
|
| +
|
| +config("vulkan_config") {
|
| + defines = [ "ENABLE_VULKAN=1" ]
|
| + if (use_x11) {
|
| + defines += [ "VK_USE_PLATFORM_XLIB_KHR" ]
|
| + }
|
| +}
|
| +
|
| +component("vulkan") {
|
| + output_name = "vulkan_wrapper"
|
| +
|
| + if (is_linux && enable_vulkan) {
|
| + assert(use_x11, "Vulkan only support x11 at this point.")
|
| + sources = [
|
| + "vulkan_export.h",
|
| + "vulkan_implementation.cc",
|
| + "vulkan_implementation.h",
|
| + "vulkan_surface.cc",
|
| + "vulkan_surface.h",
|
| + ]
|
| +
|
| + configs += [ "//build/config:precompiled_headers" ]
|
| + defines = [ "VULKAN_IMPLEMENTATION" ]
|
| +
|
| + all_dependent_configs = [ ":vulkan_config" ]
|
| + libs = [ "vulkan" ]
|
| +
|
| + include_dirs = [ "/usr/include" ]
|
| + if (target_cpu == "x64") {
|
| + lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ]
|
| + } else {
|
| + assert(false, "Unsupported vulkan target: " + target_cpu)
|
| + }
|
| +
|
| + deps = [
|
| + "//base",
|
| + ]
|
| +
|
| + if (use_x11) {
|
| + configs += [ "//build/config/linux:x11" ]
|
| + }
|
| + }
|
| +}
|
|
|