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

Side by Side Diff: gpu/vulkan/BUILD.gn

Issue 2744973002: Remove enable_vulkan from build/config, and move it to the buildflag_header system. (Closed)
Patch Set: awww year 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 unified diff | Download patch
« no previous file with comments | « content/gpu/BUILD.gn ('k') | gpu/vulkan/features.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/ui.gni") 5 import("features.gni")
6 import("//build/buildflag_header.gni")
6 import("//testing/test.gni") 7 import("//testing/test.gni")
7 8
8 config("vulkan_config") { 9 # Generate a buildflag header for compile-time checking of Vulkan support.
9 defines = [ "ENABLE_VULKAN" ] 10 buildflag_header("features") {
11 header = "features.h"
12 flags = [ "ENABLE_VULKAN=$enable_vulkan" ]
10 } 13 }
11
12 if (enable_vulkan) { 14 if (enable_vulkan) {
13 vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib" 15 vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib"
14 component("vulkan") { 16 component("vulkan") {
15 output_name = "vulkan_wrapper" 17 output_name = "vulkan_wrapper"
16 18
17 if (is_linux) { 19 if (is_linux) {
18 assert(use_x11, "Vulkan only support x11 at this point.") 20 assert(use_x11, "Vulkan only support x11 at this point.")
19 sources = [ 21 sources = [
20 "vulkan_command_buffer.cc", 22 "vulkan_command_buffer.cc",
21 "vulkan_command_buffer.h", 23 "vulkan_command_buffer.h",
(...skipping 21 matching lines...) Expand all
43 "vulkan_shader_module.h", 45 "vulkan_shader_module.h",
44 "vulkan_surface.cc", 46 "vulkan_surface.cc",
45 "vulkan_surface.h", 47 "vulkan_surface.h",
46 "vulkan_swap_chain.cc", 48 "vulkan_swap_chain.cc",
47 "vulkan_swap_chain.h", 49 "vulkan_swap_chain.h",
48 ] 50 ]
49 51
50 configs += [ "//build/config:precompiled_headers" ] 52 configs += [ "//build/config:precompiled_headers" ]
51 defines = [ "VULKAN_IMPLEMENTATION" ] 53 defines = [ "VULKAN_IMPLEMENTATION" ]
52 54
53 all_dependent_configs = [ 55 all_dependent_configs = [ "//third_party/vulkan:vulkan_headers" ]
54 ":vulkan_config",
55 "//third_party/vulkan:vulkan_headers",
56 ]
57 libs = [ "vulkan" ] 56 libs = [ "vulkan" ]
58 57
59 if (current_cpu == "x64") { 58 if (current_cpu == "x64") {
60 lib_dirs = [ 59 lib_dirs = [
61 "/usr/lib/x86_64-linux-gnu", 60 "/usr/lib/x86_64-linux-gnu",
62 vulkan_lib_dir, 61 vulkan_lib_dir,
63 ] 62 ]
64 } else { 63 } else {
65 assert(false, "Unsupported vulkan target: " + current_cpu) 64 assert(false, "Unsupported vulkan target: " + current_cpu)
66 } 65 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 "//testing/gtest", 105 "//testing/gtest",
107 ] 106 ]
108 107
109 if (use_x11) { 108 if (use_x11) {
110 sources += [ "tests/native_window_x11.cc" ] 109 sources += [ "tests/native_window_x11.cc" ]
111 deps += [ "//ui/gfx/x" ] 110 deps += [ "//ui/gfx/x" ]
112 configs += [ "//build/config/linux:x11" ] 111 configs += [ "//build/config/linux:x11" ]
113 } 112 }
114 } 113 }
115 } 114 }
OLDNEW
« 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