# 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" ] 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" ] } } }