mojo: Fix map of booleans for python bindings.
[chromium-blink-merge.git] / ui / display / BUILD.gn
blobe13abd9553c62f3413b7ccd546f530ccb8206819
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 component("display") {
8   sources = [
9     "chromeos/display_configurator.cc",
10     "chromeos/display_configurator.h",
11     "chromeos/ozone/display_configurator_ozone.cc",
12     "chromeos/x11/display_configurator_x11.cc",
13     "chromeos/x11/display_mode_x11.cc",
14     "chromeos/x11/display_mode_x11.h",
15     "chromeos/x11/display_snapshot_x11.cc",
16     "chromeos/x11/display_snapshot_x11.h",
17     "chromeos/x11/display_util_x11.cc",
18     "chromeos/x11/display_util_x11.h",
19     "chromeos/x11/native_display_delegate_x11.cc",
20     "chromeos/x11/native_display_delegate_x11.h",
21     "chromeos/x11/native_display_event_dispatcher_x11.cc",
22     "chromeos/x11/native_display_event_dispatcher_x11.h",
23     "display_export.h",
24     "display_switches.cc",
25     "display_switches.h",
26   ]
28   defines = [ "DISPLAY_IMPLEMENTATION" ]
30   deps = [
31     "//base",
32     "//ui/display/util",
33     "//ui/gfx",
34     "//ui/gfx/geometry",
35   ]
37   if (use_x11) {
38     configs += [
39       "//build/config/linux:x11",
40       "//build/config/linux:xext",
41       "//build/config/linux:xi",
42       "//build/config/linux:xrandr",
43     ]
44     deps += [
45       "//ui/events/platform",
46     ]
47     if (is_chromeos) {
48       sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ]
49     }
50   }
52   if (is_chromeos) {
53     deps += [ "//ui/display/types" ]
54   }
56   if (use_ozone) {
57     deps += [ "//ui/ozone" ]
58     sources -= [
59       "chromeos/x11/display_configurator_x11.cc",
60       "chromeos/x11/display_mode_x11.cc",
61       "chromeos/x11/display_mode_x11.h",
62       "chromeos/x11/display_snapshot_x11.cc",
63       "chromeos/x11/display_snapshot_x11.h",
64       "chromeos/x11/display_util_x11.cc",
65       "chromeos/x11/display_util_x11.h",
66       "chromeos/x11/native_display_delegate_x11.cc",
67       "chromeos/x11/native_display_delegate_x11.h",
68       "chromeos/x11/native_display_event_dispatcher_x11.cc",
69       "chromeos/x11/native_display_event_dispatcher_x11.h",
70     ]
71   }
74 component("test_util") {
75   output_name = "display_test_util"
76   sources = [
77     "chromeos/test/test_display_snapshot.cc",
78     "chromeos/test/test_display_snapshot.h",
79   ]
81   defines = [ "DISPLAY_IMPLEMENTATION" ]
83   public_deps = [
84     ":display",
85   ]
86   deps = [
87     "//base",
88     "//ui/gfx",
89     "//ui/gfx/geometry",
90   ]
92   if (is_chromeos) {
93     deps += [ "//ui/display/types" ]
94   }
97 test("display_unittests") {
98   sources = [
99     "chromeos/display_configurator_unittest.cc",
100     "chromeos/x11/display_util_x11_unittest.cc",
101     "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
102     "util/display_util_unittest.cc",
103     "util/edid_parser_unittest.cc",
104   ]
106   deps = [
107     ":test_util",
108     "//base",
109     "//base/test:run_all_unittests",
110     "//testing/gtest",
111     "//ui/display/util",
112     "//ui/gfx/geometry",
113   ]
115   if (is_chromeos) {
116     deps += [
117       ":display",
118       "//ui/display/types",
119     ]
120   }