Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Unified Diff: gpu/vulkan/BUILD.gn

Issue 2742263004: Revert of Remove enable_vulkan from build/config, and move it to the buildflag_header system. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/BUILD.gn ('k') | gpu/vulkan/features.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/BUILD.gn
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn
index b738725ebee29af049206da3c075758d259090e7..39ed1e066822ed9cf657bb46ecc84e2de310d77d 100644
--- a/gpu/vulkan/BUILD.gn
+++ b/gpu/vulkan/BUILD.gn
@@ -2,15 +2,13 @@
# 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/buildflag_header.gni")
+import("//build/config/ui.gni")
import("//testing/test.gni")
-# Generate a buildflag header for compile-time checking of Vulkan support.
-buildflag_header("features") {
- header = "features.h"
- flags = [ "ENABLE_VULKAN=$enable_vulkan" ]
+config("vulkan_config") {
+ defines = [ "ENABLE_VULKAN" ]
}
+
if (enable_vulkan) {
vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib"
component("vulkan") {
@@ -52,7 +50,10 @@
configs += [ "//build/config:precompiled_headers" ]
defines = [ "VULKAN_IMPLEMENTATION" ]
- all_dependent_configs = [ "//third_party/vulkan:vulkan_headers" ]
+ all_dependent_configs = [
+ ":vulkan_config",
+ "//third_party/vulkan:vulkan_headers",
+ ]
libs = [ "vulkan" ]
if (current_cpu == "x64") {
« no previous file with comments | « content/gpu/BUILD.gn ('k') | gpu/vulkan/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698