Rationalize and fix chromium android linker histogram recording.
[chromium-blink-merge.git] / gpu / config / BUILD.gn
blob4dab028213cc494d3f17b87774241356e7951aa8
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/ui.gni")
7 source_set("config") {
8   sources = [
9     "dx_diag_node.cc",
10     "dx_diag_node.h",
11     "gpu_blacklist.cc",
12     "gpu_blacklist.h",
13     "gpu_control_list_jsons.h",
14     "gpu_control_list.cc",
15     "gpu_control_list.h",
16     "gpu_driver_bug_list_json.cc",
17     "gpu_driver_bug_list.cc",
18     "gpu_driver_bug_list.h",
19     "gpu_driver_bug_workaround_type.h",
20     "gpu_dx_diagnostics_win.cc",
21     "gpu_feature_type.h",
22     "gpu_info.cc",
23     "gpu_info.h",
24     "gpu_info_collector_android.cc",
25     "gpu_info_collector_linux.cc",
26     "gpu_info_collector_linux.h",
27     "gpu_info_collector_mac.mm",
28     "gpu_info_collector_ozone.cc",
29     "gpu_info_collector_win.cc",
30     "gpu_info_collector_x11.cc",
31     "gpu_info_collector.cc",
32     "gpu_info_collector.h",
33     "gpu_performance_stats.h",
34     "gpu_test_config.cc",
35     "gpu_test_config.h",
36     "gpu_test_expectations_parser.cc",
37     "gpu_test_expectations_parser.h",
38     "gpu_util.cc",
39     "gpu_util.h",
40     "software_rendering_list_json.cc",
41   ]
43   defines = [ "GPU_IMPLEMENTATION" ]
45   deps = [
46     "//base",
47     "//third_party/re2",
48     "//ui/gl",
49   ]
51   # Prefer mesa GL headers to system headers, which cause problems on Win.
52   include_dirs = [ "//third_party/mesa/src/include" ]
54   if (is_win) {
55     deps += [ "//third_party/libxml" ]
56     libs = [ "dxguid.lib", "setupapi.lib" ]
58     if (is_chrome_branded && is_official_build) {
59       sources += [
60         "//third_party/amd/AmdCfxPxExt.h",
61         "//third_party/amd/amd_videocard_info_win.cc",
62       ]
63     }
64   }
65   if (is_linux && (use_x11 || use_ozone)) {
66     deps += [
67       "//build/config/linux:libpci",
68     ]
69   }
70   if (is_linux && use_x11) {
71     configs += [
72       "//build/config/linux:x11",
73       "//build/config/linux:xext",
74     ]
75     deps += [
76       "//third_party/libXNVCtrl",
77     ]
78   } else {
79     sources -= [ "gpu_info_collector_x11.cc" ]
80   }
81   if (!use_ozone) {
82     sources -= [ "gpu_info_collector_ozone.cc" ]
83   }