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

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

Issue 2472433002: Fixed compile- and link-time errors with the "enable_vulkan" GN-argument (Closed)
Patch Set: Created 4 years, 1 month 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
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("//build/config/ui.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 config("vulkan_config") { 8 config("vulkan_config") {
9 defines = [ "ENABLE_VULKAN" ] 9 defines = [ "ENABLE_VULKAN" ]
10 } 10 }
11 11
12 if (enable_vulkan) { 12 if (enable_vulkan) {
13 vulkan_lib_dir = getenv("VULKAN_SDK") + "/lib"
piman 2016/11/01 19:45:13 What is this for? The expectation is that the vulk
Sergey.Kipet 2016/11/04 22:15:36 Well, seems like starting from the SDK version 1.0
piman 2016/11/05 00:39:06 Ok. This is not a great long-term situation, but b
Sergey.Kipet 2016/11/05 09:10:11 Acknowledged.
13 component("vulkan") { 14 component("vulkan") {
14 output_name = "vulkan_wrapper" 15 output_name = "vulkan_wrapper"
15 16
16 if (is_linux) { 17 if (is_linux) {
17 assert(use_x11, "Vulkan only support x11 at this point.") 18 assert(use_x11, "Vulkan only support x11 at this point.")
18 sources = [ 19 sources = [
19 "vulkan_command_buffer.cc", 20 "vulkan_command_buffer.cc",
20 "vulkan_command_buffer.h", 21 "vulkan_command_buffer.h",
21 "vulkan_command_pool.cc", 22 "vulkan_command_pool.cc",
22 "vulkan_command_pool.h", 23 "vulkan_command_pool.h",
(...skipping 26 matching lines...) Expand all
49 configs += [ "//build/config:precompiled_headers" ] 50 configs += [ "//build/config:precompiled_headers" ]
50 defines = [ "VULKAN_IMPLEMENTATION" ] 51 defines = [ "VULKAN_IMPLEMENTATION" ]
51 52
52 all_dependent_configs = [ 53 all_dependent_configs = [
53 ":vulkan_config", 54 ":vulkan_config",
54 "//third_party/vulkan:vulkan_headers", 55 "//third_party/vulkan:vulkan_headers",
55 ] 56 ]
56 libs = [ "vulkan" ] 57 libs = [ "vulkan" ]
57 58
58 if (current_cpu == "x64") { 59 if (current_cpu == "x64") {
59 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ] 60 lib_dirs = [
61 "/usr/lib/x86_64-linux-gnu",
62 vulkan_lib_dir,
63 ]
60 } else { 64 } else {
61 assert(false, "Unsupported vulkan target: " + current_cpu) 65 assert(false, "Unsupported vulkan target: " + current_cpu)
62 } 66 }
63 67
64 deps = [ 68 deps = [
65 "//base", 69 "//base",
66 "//third_party/shaderc:libshaderc", 70 "//third_party/shaderc:libshaderc",
67 "//ui/base", 71 "//ui/base",
68 "//ui/gfx", 72 "//ui/gfx",
69 ] 73 ]
(...skipping 10 matching lines...) Expand all
80 "tests/basic_vulkan_test.cc", 84 "tests/basic_vulkan_test.cc",
81 "tests/basic_vulkan_test.h", 85 "tests/basic_vulkan_test.h",
82 "tests/native_window.h", 86 "tests/native_window.h",
83 "tests/shader_module_unittest.cc", 87 "tests/shader_module_unittest.cc",
84 "tests/vulkan_test.cc", 88 "tests/vulkan_test.cc",
85 "tests/vulkan_tests_main.cc", 89 "tests/vulkan_tests_main.cc",
86 ] 90 ]
87 91
88 include_dirs = [ "/usr/include" ] 92 include_dirs = [ "/usr/include" ]
89 if (current_cpu == "x64") { 93 if (current_cpu == "x64") {
90 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ] 94 lib_dirs = [
95 "/usr/lib/x86_64-linux-gnu",
96 vulkan_lib_dir,
97 ]
91 } else { 98 } else {
92 assert(false, "Unsupported vulkan target: " + current_cpu) 99 assert(false, "Unsupported vulkan target: " + current_cpu)
93 } 100 }
94 101
95 deps = [ 102 deps = [
96 ":vulkan", 103 ":vulkan",
97 "//base/test:test_support", 104 "//base/test:test_support",
98 "//testing/gmock", 105 "//testing/gmock",
99 "//testing/gtest", 106 "//testing/gtest",
100 ] 107 ]
101 108
102 if (use_x11) { 109 if (use_x11) {
103 sources += [ "tests/native_window_x11.cc" ] 110 sources += [ "tests/native_window_x11.cc" ]
104 deps += [ "//ui/gfx/x" ] 111 deps += [ "//ui/gfx/x" ]
105 configs += [ "//build/config/linux:x11" ] 112 configs += [ "//build/config/linux:x11" ]
106 } 113 }
107 } 114 }
108 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698