OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/linux/pkg_config.gni") | 6 import("//build/config/linux/pkg_config.gni") |
7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Support ChromeOS touchpad gestures with ozone. | 10 # Support ChromeOS touchpad gestures with ozone. |
11 use_evdev_gestures = false | 11 use_evdev_gestures = false |
12 } | 12 } |
13 | 13 |
14 if (use_xkbcommon) { | 14 if (use_xkbcommon) { |
15 pkg_config("xkbcommon") { | 15 pkg_config("xkbcommon") { |
16 packages = [ "xkbcommon" ] | 16 packages = [ "xkbcommon" ] |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
20 component("events_ozone") { | 20 if (use_ozone) { |
21 sources = [ | 21 component("events_ozone") { |
22 "chromeos/cursor_controller.cc", | 22 sources = [ |
23 "chromeos/cursor_controller.h", | 23 "chromeos/cursor_controller.cc", |
24 "device/device_event.cc", | 24 "chromeos/cursor_controller.h", |
25 "device/device_event.h", | 25 "device/device_event.cc", |
26 "device/device_event_observer.h", | 26 "device/device_event.h", |
27 "device/device_manager.cc", | 27 "device/device_event_observer.h", |
28 "device/device_manager.h", | 28 "device/device_manager.cc", |
29 "device/device_manager_manual.cc", | 29 "device/device_manager.h", |
30 "device/device_manager_manual.h", | 30 "device/device_manager_manual.cc", |
31 "device/udev/device_manager_udev.cc", | 31 "device/device_manager_manual.h", |
32 "device/udev/device_manager_udev.h", | |
33 "events_ozone_export.h", | |
34 ] | |
35 | |
36 deps = [ | |
37 "//base", | |
38 "//base/third_party/dynamic_annotations", | |
39 "//ui/events", | |
40 "//ui/events:events_base", | |
41 ] | |
42 | |
43 defines = [ "EVENTS_OZONE_IMPLEMENTATION" ] | |
44 | |
45 if (!use_udev) { | |
46 sources -= [ | |
47 "device/udev/device_manager_udev.cc", | 32 "device/udev/device_manager_udev.cc", |
48 "device/udev/device_manager_udev.h", | 33 "device/udev/device_manager_udev.h", |
| 34 "events_ozone_export.h", |
49 ] | 35 ] |
| 36 |
| 37 deps = [ |
| 38 "//base", |
| 39 "//base/third_party/dynamic_annotations", |
| 40 "//ui/events", |
| 41 "//ui/events:events_base", |
| 42 ] |
| 43 |
| 44 defines = [ "EVENTS_OZONE_IMPLEMENTATION" ] |
| 45 |
| 46 if (!use_udev) { |
| 47 sources -= [ |
| 48 "device/udev/device_manager_udev.cc", |
| 49 "device/udev/device_manager_udev.h", |
| 50 ] |
| 51 } |
| 52 |
| 53 if (use_ozone && use_udev) { |
| 54 deps += [ "//device/udev_linux" ] |
| 55 } |
50 } | 56 } |
51 | 57 |
52 if (use_ozone && use_udev) { | 58 config("evdev") { |
53 deps += [ "//device/udev_linux" ] | 59 defines = [ "USE_EVDEV" ] |
| 60 } |
| 61 |
| 62 config("evdev_gestures") { |
| 63 defines = [ "USE_EVDEV_GESTURES" ] |
| 64 } |
| 65 |
| 66 if (use_evdev_gestures) { |
| 67 pkg_config("libevdev-cros") { |
| 68 packages = [ "libevdev-cros" ] |
| 69 } |
| 70 |
| 71 pkg_config("libgestures") { |
| 72 packages = [ "libgestures" ] |
| 73 } |
| 74 } |
| 75 |
| 76 component("events_ozone_evdev") { |
| 77 sources = [ |
| 78 "evdev/device_event_dispatcher_evdev.cc", |
| 79 "evdev/device_event_dispatcher_evdev.h", |
| 80 "evdev/event_converter_evdev.cc", |
| 81 "evdev/event_converter_evdev.h", |
| 82 "evdev/event_converter_evdev_impl.cc", |
| 83 "evdev/event_converter_evdev_impl.h", |
| 84 "evdev/event_device_info.cc", |
| 85 "evdev/event_device_info.h", |
| 86 "evdev/event_factory_evdev.cc", |
| 87 "evdev/event_factory_evdev.h", |
| 88 "evdev/event_modifiers_evdev.cc", |
| 89 "evdev/event_modifiers_evdev.h", |
| 90 "evdev/event_thread_evdev.cc", |
| 91 "evdev/event_thread_evdev.h", |
| 92 "evdev/events_ozone_evdev_export.h", |
| 93 "evdev/input_controller_evdev.cc", |
| 94 "evdev/input_controller_evdev.h", |
| 95 "evdev/input_device_factory_evdev.cc", |
| 96 "evdev/input_device_factory_evdev.h", |
| 97 "evdev/input_device_factory_evdev_proxy.cc", |
| 98 "evdev/input_device_factory_evdev_proxy.h", |
| 99 "evdev/input_device_settings_evdev.cc", |
| 100 "evdev/input_device_settings_evdev.h", |
| 101 "evdev/input_injector_evdev.cc", |
| 102 "evdev/input_injector_evdev.h", |
| 103 "evdev/keyboard_evdev.cc", |
| 104 "evdev/keyboard_evdev.h", |
| 105 "evdev/keyboard_util_evdev.cc", |
| 106 "evdev/keyboard_util_evdev.h", |
| 107 "evdev/mouse_button_map_evdev.cc", |
| 108 "evdev/mouse_button_map_evdev.h", |
| 109 "evdev/tablet_event_converter_evdev.cc", |
| 110 "evdev/tablet_event_converter_evdev.h", |
| 111 "evdev/touch_evdev_debug_buffer.cc", |
| 112 "evdev/touch_evdev_debug_buffer.h", |
| 113 "evdev/touch_evdev_types.cc", |
| 114 "evdev/touch_evdev_types.h", |
| 115 "evdev/touch_event_converter_evdev.cc", |
| 116 "evdev/touch_event_converter_evdev.h", |
| 117 "evdev/touch_noise/far_apart_taps_touch_noise_filter.cc", |
| 118 "evdev/touch_noise/far_apart_taps_touch_noise_filter.h", |
| 119 "evdev/touch_noise/horizontally_aligned_touch_noise_filter.cc", |
| 120 "evdev/touch_noise/horizontally_aligned_touch_noise_filter.h", |
| 121 "evdev/touch_noise/single_position_touch_noise_filter.cc", |
| 122 "evdev/touch_noise/single_position_touch_noise_filter.h", |
| 123 "evdev/touch_noise/touch_noise_filter.h", |
| 124 "evdev/touch_noise/touch_noise_finder.cc", |
| 125 "evdev/touch_noise/touch_noise_finder.h", |
| 126 ] |
| 127 |
| 128 defines = [ "EVENTS_OZONE_EVDEV_IMPLEMENTATION" ] |
| 129 |
| 130 deps = [ |
| 131 ":events_ozone", |
| 132 ":events_ozone_layout", |
| 133 "//base", |
| 134 "//ui/events", |
| 135 "//ui/events:dom_keycode_converter", |
| 136 "//ui/events:events_base", |
| 137 "//ui/events/devices", |
| 138 "//ui/events/platform", |
| 139 "//ui/gfx", |
| 140 ] |
| 141 |
| 142 public_configs = [ ":evdev" ] |
| 143 |
| 144 if (use_ozone && use_evdev_gestures) { |
| 145 sources += [ |
| 146 "evdev/libgestures_glue/event_reader_libevdev_cros.cc", |
| 147 "evdev/libgestures_glue/event_reader_libevdev_cros.h", |
| 148 "evdev/libgestures_glue/gesture_feedback.cc", |
| 149 "evdev/libgestures_glue/gesture_feedback.h", |
| 150 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc", |
| 151 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h", |
| 152 "evdev/libgestures_glue/gesture_logging.cc", |
| 153 "evdev/libgestures_glue/gesture_logging.h", |
| 154 "evdev/libgestures_glue/gesture_property_provider.cc", |
| 155 "evdev/libgestures_glue/gesture_property_provider.h", |
| 156 "evdev/libgestures_glue/gesture_timer_provider.cc", |
| 157 "evdev/libgestures_glue/gesture_timer_provider.h", |
| 158 ] |
| 159 |
| 160 public_configs += [ ":evdev_gestures" ] |
| 161 |
| 162 configs += [ |
| 163 ":libevdev-cros", |
| 164 ":libgestures", |
| 165 ] |
| 166 } |
54 } | 167 } |
55 } | 168 } |
56 | 169 |
57 config("evdev") { | |
58 defines = [ "USE_EVDEV" ] | |
59 } | |
60 | |
61 config("evdev_gestures") { | |
62 defines = [ "USE_EVDEV_GESTURES" ] | |
63 } | |
64 | |
65 if (use_evdev_gestures) { | |
66 pkg_config("libevdev-cros") { | |
67 packages = [ "libevdev-cros" ] | |
68 } | |
69 | |
70 pkg_config("libgestures") { | |
71 packages = [ "libgestures" ] | |
72 } | |
73 } | |
74 | |
75 component("events_ozone_evdev") { | |
76 sources = [ | |
77 "evdev/device_event_dispatcher_evdev.cc", | |
78 "evdev/device_event_dispatcher_evdev.h", | |
79 "evdev/event_converter_evdev.cc", | |
80 "evdev/event_converter_evdev.h", | |
81 "evdev/event_converter_evdev_impl.cc", | |
82 "evdev/event_converter_evdev_impl.h", | |
83 "evdev/event_device_info.cc", | |
84 "evdev/event_device_info.h", | |
85 "evdev/event_factory_evdev.cc", | |
86 "evdev/event_factory_evdev.h", | |
87 "evdev/event_modifiers_evdev.cc", | |
88 "evdev/event_modifiers_evdev.h", | |
89 "evdev/event_thread_evdev.cc", | |
90 "evdev/event_thread_evdev.h", | |
91 "evdev/events_ozone_evdev_export.h", | |
92 "evdev/input_controller_evdev.cc", | |
93 "evdev/input_controller_evdev.h", | |
94 "evdev/input_device_factory_evdev.cc", | |
95 "evdev/input_device_factory_evdev.h", | |
96 "evdev/input_device_factory_evdev_proxy.cc", | |
97 "evdev/input_device_factory_evdev_proxy.h", | |
98 "evdev/input_device_settings_evdev.cc", | |
99 "evdev/input_device_settings_evdev.h", | |
100 "evdev/input_injector_evdev.cc", | |
101 "evdev/input_injector_evdev.h", | |
102 "evdev/keyboard_evdev.cc", | |
103 "evdev/keyboard_evdev.h", | |
104 "evdev/keyboard_util_evdev.cc", | |
105 "evdev/keyboard_util_evdev.h", | |
106 "evdev/mouse_button_map_evdev.cc", | |
107 "evdev/mouse_button_map_evdev.h", | |
108 "evdev/tablet_event_converter_evdev.cc", | |
109 "evdev/tablet_event_converter_evdev.h", | |
110 "evdev/touch_evdev_debug_buffer.cc", | |
111 "evdev/touch_evdev_debug_buffer.h", | |
112 "evdev/touch_evdev_types.cc", | |
113 "evdev/touch_evdev_types.h", | |
114 "evdev/touch_event_converter_evdev.cc", | |
115 "evdev/touch_event_converter_evdev.h", | |
116 "evdev/touch_noise/far_apart_taps_touch_noise_filter.cc", | |
117 "evdev/touch_noise/far_apart_taps_touch_noise_filter.h", | |
118 "evdev/touch_noise/horizontally_aligned_touch_noise_filter.cc", | |
119 "evdev/touch_noise/horizontally_aligned_touch_noise_filter.h", | |
120 "evdev/touch_noise/single_position_touch_noise_filter.cc", | |
121 "evdev/touch_noise/single_position_touch_noise_filter.h", | |
122 "evdev/touch_noise/touch_noise_filter.h", | |
123 "evdev/touch_noise/touch_noise_finder.cc", | |
124 "evdev/touch_noise/touch_noise_finder.h", | |
125 ] | |
126 | |
127 defines = [ "EVENTS_OZONE_EVDEV_IMPLEMENTATION" ] | |
128 | |
129 deps = [ | |
130 ":events_ozone", | |
131 ":events_ozone_layout", | |
132 "//base", | |
133 "//ui/events", | |
134 "//ui/events:dom_keycode_converter", | |
135 "//ui/events:events_base", | |
136 "//ui/events/devices", | |
137 "//ui/events/platform", | |
138 "//ui/gfx", | |
139 ] | |
140 | |
141 public_configs = [ ":evdev" ] | |
142 | |
143 if (use_ozone && use_evdev_gestures) { | |
144 sources += [ | |
145 "evdev/libgestures_glue/event_reader_libevdev_cros.cc", | |
146 "evdev/libgestures_glue/event_reader_libevdev_cros.h", | |
147 "evdev/libgestures_glue/gesture_feedback.cc", | |
148 "evdev/libgestures_glue/gesture_feedback.h", | |
149 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc", | |
150 "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h", | |
151 "evdev/libgestures_glue/gesture_logging.cc", | |
152 "evdev/libgestures_glue/gesture_logging.h", | |
153 "evdev/libgestures_glue/gesture_property_provider.cc", | |
154 "evdev/libgestures_glue/gesture_property_provider.h", | |
155 "evdev/libgestures_glue/gesture_timer_provider.cc", | |
156 "evdev/libgestures_glue/gesture_timer_provider.h", | |
157 ] | |
158 | |
159 public_configs += [ ":evdev_gestures" ] | |
160 | |
161 configs += [ | |
162 ":libevdev-cros", | |
163 ":libgestures", | |
164 ] | |
165 } | |
166 } | |
167 | |
168 config("events_ozone_layout_config") { | 170 config("events_ozone_layout_config") { |
169 if (use_xkbcommon) { | 171 if (use_xkbcommon) { |
170 defines = [ "USE_XKBCOMMON" ] | 172 defines = [ "USE_XKBCOMMON" ] |
171 } | 173 } |
172 } | 174 } |
173 | 175 |
174 component("events_ozone_layout") { | 176 component("events_ozone_layout") { |
175 sources = [ | 177 sources = [ |
176 "layout/events_ozone_layout_export.h", | 178 "layout/events_ozone_layout_export.h", |
177 "layout/keyboard_layout_engine.h", | 179 "layout/keyboard_layout_engine.h", |
(...skipping 25 matching lines...) Expand all Loading... |
203 "layout/xkb/xkb.h", | 205 "layout/xkb/xkb.h", |
204 "layout/xkb/xkb_evdev_codes.cc", | 206 "layout/xkb/xkb_evdev_codes.cc", |
205 "layout/xkb/xkb_evdev_codes.h", | 207 "layout/xkb/xkb_evdev_codes.h", |
206 "layout/xkb/xkb_key_code_converter.h", | 208 "layout/xkb/xkb_key_code_converter.h", |
207 "layout/xkb/xkb_keyboard_layout_engine.cc", | 209 "layout/xkb/xkb_keyboard_layout_engine.cc", |
208 "layout/xkb/xkb_keyboard_layout_engine.h", | 210 "layout/xkb/xkb_keyboard_layout_engine.h", |
209 "layout/xkb/xkb_keysym.h", | 211 "layout/xkb/xkb_keysym.h", |
210 ] | 212 ] |
211 } | 213 } |
212 } | 214 } |
OLD | NEW |