Index: gpu/vulkan/BUILD.gn |
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..274071fbf87bd6c4c63a0f50fd7cc84d3204c744 |
--- /dev/null |
+++ b/gpu/vulkan/BUILD.gn |
@@ -0,0 +1,51 @@ |
+# 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" ] |
+ 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" ] |
Nico
2016/03/09 02:43:33
(nit: atm this target is so small that using this
|
+ 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", |
+ "//ui/base", |
+ "//ui/gfx", |
+ ] |
+ |
+ if (use_x11) { |
+ deps += [ "//ui/gfx/x" ] |
+ configs += [ "//build/config/linux:x11" ] |
+ } |
+ } |
+} |