Chromium Code Reviews| Index: gpu/vulkan/BUILD.gn |
| diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn |
| index 39ed1e066822ed9cf657bb46ecc84e2de310d77d..b738725ebee29af049206da3c075758d259090e7 100644 |
| --- a/gpu/vulkan/BUILD.gn |
| +++ b/gpu/vulkan/BUILD.gn |
| @@ -2,13 +2,15 @@ |
| # 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") |
| +import("features.gni") |
|
danakj
2017/03/13 15:13:59
confirming this shouldn't be a path from the root?
Nico
2017/03/13 15:19:29
relative imports are frequent when importing somet
|
| +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 +52,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") { |