Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / gpu / config / BUILD.gn
blob1300ccacf731c86d4949b5472253ab5f0e013022
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/chrome_build.gni")
6 import("//build/config/ui.gni")
8 declare_args() {
9   # Use the PCI lib to collect GPU information on Linux.
10   use_libpci = true
13 group("config") {
14   if (is_component_build) {
15     public_deps = [
16       "//gpu",
17     ]
18   } else {
19     public_deps = [
20       ":config_sources",
21     ]
22   }
25 source_set("config_sources") {
26   visibility = [ "//gpu/*" ]
28   sources = [
29     "dx_diag_node.cc",
30     "dx_diag_node.h",
31     "gpu_blacklist.cc",
32     "gpu_blacklist.h",
33     "gpu_control_list.cc",
34     "gpu_control_list.h",
35     "gpu_control_list_jsons.h",
36     "gpu_driver_bug_list.cc",
37     "gpu_driver_bug_list.h",
38     "gpu_driver_bug_list_json.cc",
39     "gpu_driver_bug_workaround_type.h",
40     "gpu_dx_diagnostics_win.cc",
41     "gpu_feature_type.h",
42     "gpu_info.cc",
43     "gpu_info.h",
44     "gpu_info_collector.cc",
45     "gpu_info_collector.h",
46     "gpu_info_collector_android.cc",
47     "gpu_info_collector_linux.cc",
48     "gpu_info_collector_linux.h",
49     "gpu_info_collector_mac.mm",
50     "gpu_info_collector_ozone.cc",
51     "gpu_info_collector_win.cc",
52     "gpu_info_collector_x11.cc",
53     "gpu_switches.cc",
54     "gpu_switches.h",
55     "gpu_test_config.cc",
56     "gpu_test_config.h",
57     "gpu_test_expectations_parser.cc",
58     "gpu_test_expectations_parser.h",
59     "gpu_util.cc",
60     "gpu_util.h",
61     "software_rendering_list_json.cc",
62   ]
64   configs += [
65     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
66     "//build/config/compiler:no_size_t_to_int_warning",
67     "//gpu:gpu_implementation",
68   ]
70   deps = [
71     "//base",
72     "//third_party/re2",
73     "//ui/gl",
74   ]
76   # Prefer mesa GL headers to system headers, which cause problems on Win.
77   include_dirs = [ "//third_party/mesa/src/include" ]
79   if (is_win) {
80     deps += [ "//third_party/libxml" ]
81     libs = [
82       "dxguid.lib",
83       "setupapi.lib",
84     ]
86     if (is_chrome_branded && is_official_build) {
87       sources += [
88         "//third_party/amd/AmdCfxPxExt.h",
89         "//third_party/amd/amd_videocard_info_win.cc",
90       ]
91     }
92   }
93   if (use_libpci) {
94     defines = [ "USE_LIBPCI=1" ]
95   }
96   if (is_linux && use_libpci && (use_x11 || use_ozone)) {
97     deps += [ "//build/config/linux:libpci" ]
98   }
99   if (is_linux && use_x11) {
100     configs += [
101       "//build/config/linux:x11",
102       "//build/config/linux:xext",
103     ]
104     deps += [
105       "//third_party/libXNVCtrl",
106       "//ui/gfx/x",
107     ]
108   } else {
109     sources -= [ "gpu_info_collector_x11.cc" ]
110   }
111   if (!use_ozone) {
112     sources -= [ "gpu_info_collector_ozone.cc" ]
113   }