Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / events / ozone / BUILD.gn
blob51ad96db7d549c004f0144abc6ac05da388a81ab
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/features.gni")
6 import("//build/config/ui.gni")
8 component("events_ozone") {
9   sources = [
10     "device/device_event.cc",
11     "device/device_event.h",
12     "device/device_event_observer.h",
13     "device/device_manager.cc",
14     "device/device_manager.h",
15     "device/device_manager_manual.cc",
16     "device/device_manager_manual.h",
17     "device/udev/device_manager_udev.cc",
18     "device/udev/device_manager_udev.h",
19     "events_ozone_export.h",
20   ]
22   deps = [
23     "//base",
24   ]
26   defines = [
27     "EVENTS_OZONE_IMPLEMENTATION",
28   ]
30   if (!use_udev) {
31     sources -= [
32       "device/udev/device_manager_udev.cc",
33       "device/udev/device_manager_udev.h",
34     ]
35   }
37   if (use_ozone_evdev && use_udev) {
38     deps += [
39       "//device/udev_linux",
40     ]
41   }
44 component("events_ozone_evdev") {
45   sources = [
46     "evdev/event_converter_evdev.cc",
47     "evdev/event_converter_evdev.h",
48     "evdev/event_device_info.cc",
49     "evdev/event_device_info.h",
50     "evdev/event_factory_evdev.cc",
51     "evdev/event_factory_evdev.h",
52     "evdev/event_modifiers_evdev.cc",
53     "evdev/event_modifiers_evdev.h",
54     "evdev/events_ozone_evdev_export.h",
55     "evdev/key_event_converter_evdev.cc",
56     "evdev/key_event_converter_evdev.h",
57     "evdev/touch_event_converter_evdev.cc",
58     "evdev/touch_event_converter_evdev.h",
59   ]
61   defines = [
62     "EVENTS_OZONE_EVDEV_IMPLEMENTATION",
63   ]
65   deps = [
66     ":events_ozone",
67     "//base",
68     "//ui/events/platform",
69     "//ui/gfx",
70   ]
72   if (use_ozone_evdev) {
73     defines += [
74       "USE_OZONE_EVDEV=1"
75     ]
76   }
78   if (use_ozone_evdev && use_evdev_gestures) {
79     sources += [
80       "evdev/libgestures_glue/event_reader_libevdev_cros.cc",
81       "evdev/libgestures_glue/event_reader_libevdev_cros.h",
82       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc",
83       "evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h",
84       "evdev/libgestures_glue/gesture_logging.cc",
85       "evdev/libgestures_glue/gesture_logging.h",
86       "evdev/libgestures_glue/gesture_timer_provider.cc",
87       "evdev/libgestures_glue/gesture_timer_provider.h",
88     ]
90     defines += [
91       "USE_EVDEV_GESTURES",
92     ]
94     configs += [
95       "//build/config/linux:libevdev-cros",
96       "//build/config/linux:libgestures",
97     ]
98   }