Add ICU message format support
[chromium-blink-merge.git] / ui / display / BUILD.gn
blob4f474f6b8b8448f359f0a4ecc5bfd5b44f5129c8
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")
6 import("//testing/test.gni")
8 if (is_chromeos) {
9   component("display") {
10     sources = [
11       "chromeos/apply_content_protection_task.cc",
12       "chromeos/apply_content_protection_task.h",
13       "chromeos/configure_displays_task.cc",
14       "chromeos/configure_displays_task.h",
15       "chromeos/display_configurator.cc",
16       "chromeos/display_configurator.h",
17       "chromeos/display_layout_manager.h",
18       "chromeos/display_util.cc",
19       "chromeos/display_util.h",
20       "chromeos/ozone/display_configurator_ozone.cc",
21       "chromeos/query_content_protection_task.cc",
22       "chromeos/query_content_protection_task.h",
23       "chromeos/update_display_configuration_task.cc",
24       "chromeos/update_display_configuration_task.h",
25       "chromeos/x11/display_configurator_x11.cc",
26       "chromeos/x11/display_mode_x11.cc",
27       "chromeos/x11/display_mode_x11.h",
28       "chromeos/x11/display_snapshot_x11.cc",
29       "chromeos/x11/display_snapshot_x11.h",
30       "chromeos/x11/display_util_x11.cc",
31       "chromeos/x11/display_util_x11.h",
32       "chromeos/x11/native_display_delegate_x11.cc",
33       "chromeos/x11/native_display_delegate_x11.h",
34       "chromeos/x11/native_display_event_dispatcher_x11.cc",
35       "chromeos/x11/native_display_event_dispatcher_x11.h",
36       "display_export.h",
37       "display_switches.cc",
38       "display_switches.h",
39     ]
41     defines = [ "DISPLAY_IMPLEMENTATION" ]
43     deps = [
44       "//base",
45       "//ui/display/types",
46       "//ui/display/util",
47       "//ui/gfx",
48       "//ui/gfx/geometry",
49     ]
51     if (use_x11) {
52       sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
53       configs += [
54         "//build/config/linux:x11",
55         "//build/config/linux:xext",
56         "//build/config/linux:xi",
57         "//build/config/linux:xrandr",
58       ]
59       deps += [ "//ui/events/platform" ]
60     }
62     deps += []
63     if (use_x11) {
64       deps += [ "//ui/gfx/x" ]
65     }
67     if (use_ozone) {
68       deps += [ "//ui/ozone" ]
69       sources -= [
70         "chromeos/x11/display_configurator_x11.cc",
71         "chromeos/x11/display_mode_x11.cc",
72         "chromeos/x11/display_mode_x11.h",
73         "chromeos/x11/display_snapshot_x11.cc",
74         "chromeos/x11/display_snapshot_x11.h",
75         "chromeos/x11/display_util_x11.cc",
76         "chromeos/x11/display_util_x11.h",
77         "chromeos/x11/native_display_delegate_x11.cc",
78         "chromeos/x11/native_display_delegate_x11.h",
79         "chromeos/x11/native_display_event_dispatcher_x11.cc",
80         "chromeos/x11/native_display_event_dispatcher_x11.h",
81       ]
82     }
83   }
85   component("test_util") {
86     output_name = "display_test_util"
87     sources = [
88       "chromeos/test/test_display_snapshot.cc",
89       "chromeos/test/test_display_snapshot.h",
90     ]
92     defines = [ "DISPLAY_IMPLEMENTATION" ]
94     public_deps = [
95       ":display",
96     ]
97     deps = [
98       "//base",
99       "//ui/display/types",
100       "//ui/gfx",
101       "//ui/gfx/geometry",
102     ]
103   }
105   source_set("test_support") {
106     testonly = true
107     sources = [
108       "chromeos/test/action_logger.cc",
109       "chromeos/test/action_logger.h",
110       "chromeos/test/action_logger_util.cc",
111       "chromeos/test/action_logger_util.h",
112       "chromeos/test/test_display_layout_manager.cc",
113       "chromeos/test/test_display_layout_manager.h",
114       "chromeos/test/test_native_display_delegate.cc",
115       "chromeos/test/test_native_display_delegate.h",
116     ]
118     public_deps = [
119       ":display",
120     ]
121     deps = [
122       "//base",
123       "//ui/display/types",
124       "//ui/gfx",
125       "//ui/gfx/geometry",
126     ]
127   }
130 # TODO(GYP): Delete this after we've converted everything to GN.
131 # The _run targets exist only for compatibility w/ GYP.
132 group("display_unittests_run") {
133   testonly = true
134   deps = [
135     ":display_unittests",
136   ]
139 # This test covers the ChromeOS "display" target as well as the cross-platform
140 # //display/util target.
141 test("display_unittests") {
142   sources = [
143     "chromeos/apply_content_protection_task_unittest.cc",
144     "chromeos/configure_displays_task_unittest.cc",
145     "chromeos/display_configurator_unittest.cc",
146     "chromeos/query_content_protection_task_unittest.cc",
147     "chromeos/update_display_configuration_task_unittest.cc",
148     "chromeos/x11/display_util_x11_unittest.cc",
149     "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
150     "util/display_util_unittest.cc",
151     "util/edid_parser_unittest.cc",
152   ]
154   deps = [
155     "//base",
156     "//base/test:run_all_unittests",
157     "//testing/gtest",
158     "//ui/display/util",
159     "//ui/gfx/geometry",
160   ]
162   if (is_chromeos) {
163     deps += [
164       ":display",
165       ":test_support",
166       ":test_util",
167       "//base/test:test_support",
168       "//ui/display/types",
169     ]
170   }
172   if (use_ozone && is_chromeos) {
173     sources -= [
174       "chromeos/x11/display_util_x11_unittest.cc",
175       "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
176     ]
177   }