diff options
Diffstat (limited to 'chromium/gpu/vulkan/BUILD.gn')
-rw-r--r-- | chromium/gpu/vulkan/BUILD.gn | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chromium/gpu/vulkan/BUILD.gn b/chromium/gpu/vulkan/BUILD.gn index 39ed1e06682..a901159e8c6 100644 --- a/chromium/gpu/vulkan/BUILD.gn +++ b/chromium/gpu/vulkan/BUILD.gn @@ -2,13 +2,16 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("features.gni") import("//build/config/ui.gni") +import("//build/buildflag_header.gni") import("//testing/test.gni") -config("vulkan_config") { - defines = [ "ENABLE_VULKAN" ] +# Generate a buildflag header for compile-time checking of Vulkan support. +buildflag_header("features") { + header = "features.h" + flags = [ "ENABLE_VULKAN=$enable_vulkan" ] } - if (enable_vulkan) { vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib" component("vulkan") { @@ -50,10 +53,7 @@ if (enable_vulkan) { configs += [ "//build/config:precompiled_headers" ] defines = [ "VULKAN_IMPLEMENTATION" ] - all_dependent_configs = [ - ":vulkan_config", - "//third_party/vulkan:vulkan_headers", - ] + all_dependent_configs = [ "//third_party/vulkan:vulkan_headers" ] libs = [ "vulkan" ] if (current_cpu == "x64") { |