Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / ui / events / events.gyp
1 # Copyright 2013 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.
4
5 {
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'dom4_keycode_converter',
12       'type': 'static_library',
13       'dependencies': [
14         '<(DEPTH)/base/base.gyp:base',
15       ],
16       'sources': [
17         'keycodes/dom4/keycode_converter.cc',
18         'keycodes/dom4/keycode_converter.h',
19         'keycodes/dom4/keycode_converter_data.h',
20       ],
21     },
22     {
23       'target_name': 'events_base',
24       'type': '<(component)',
25       'dependencies': [
26         '<(DEPTH)/base/base.gyp:base',
27         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
28         '../gfx/gfx.gyp:gfx',
29         '../gfx/gfx.gyp:gfx_geometry',
30         'dom4_keycode_converter',
31       ],
32       'defines': [
33         'EVENTS_BASE_IMPLEMENTATION',
34       ],
35       'sources': [
36         'event_constants.h',
37         'event_switches.cc',
38         'event_switches.h',
39         'events_base_export.h',
40         'gesture_event_details.cc',
41         'gesture_event_details.h',
42         'keycodes/keyboard_code_conversion.cc',
43         'keycodes/keyboard_code_conversion.h',
44         'keycodes/keyboard_code_conversion_android.cc',
45         'keycodes/keyboard_code_conversion_android.h',
46         'keycodes/keyboard_code_conversion_gtk.cc',
47         'keycodes/keyboard_code_conversion_gtk.h',
48         'keycodes/keyboard_code_conversion_mac.h',
49         'keycodes/keyboard_code_conversion_mac.mm',
50         'keycodes/keyboard_code_conversion_win.cc',
51         'keycodes/keyboard_code_conversion_win.h',
52         'keycodes/keyboard_code_conversion_x.cc',
53         'keycodes/keyboard_code_conversion_x.h',
54         'keycodes/keyboard_codes.h',
55         'latency_info.cc',
56         'latency_info.h',
57         'x/device_list_cache_x.cc',
58         'x/device_list_cache_x.h',
59         'x/device_data_manager.cc',
60         'x/device_data_manager.h',
61         'x/touch_factory_x11.cc',
62         'x/touch_factory_x11.h',
63       ],
64       'conditions': [
65         ['use_x11==1', {
66           'dependencies': [
67             '<(DEPTH)/build/linux/system.gyp:x11',
68           ],
69         }],
70       ],
71     },
72     {
73       'target_name': 'events',
74       'type': '<(component)',
75       'dependencies': [
76         '<(DEPTH)/base/base.gyp:base',
77         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
78         '<(DEPTH)/skia/skia.gyp:skia',
79         '../gfx/gfx.gyp:gfx',
80         '../gfx/gfx.gyp:gfx_geometry',
81         'events_base',
82       ],
83       'defines': [
84         'EVENTS_IMPLEMENTATION',
85       ],
86       'sources': [
87         'cocoa/cocoa_event_utils.h',
88         'cocoa/cocoa_event_utils.mm',
89         'event.cc',
90         'event.h',
91         'event_dispatcher.cc',
92         'event_dispatcher.h',
93         'event_handler.cc',
94         'event_handler.h',
95         'event_processor.cc',
96         'event_processor.h',
97         'event_rewriter.h',
98         'event_source.cc',
99         'event_source.h',
100         'event_target.cc',
101         'event_target.h',
102         'event_target_iterator.h',
103         'event_targeter.cc',
104         'event_targeter.h',
105         'event_utils.cc',
106         'event_utils.h',
107         'events_export.h',
108         'events_stub.cc',
109         'gestures/gesture_configuration.cc',
110         'gestures/gesture_configuration.h',
111         'gestures/gesture_point.cc',
112         'gestures/gesture_point.h',
113         'gestures/gesture_recognizer.h',
114         'gestures/gesture_recognizer_impl.cc',
115         'gestures/gesture_recognizer_impl.h',
116         'gestures/gesture_sequence.cc',
117         'gestures/gesture_sequence.h',
118         'gestures/gesture_types.h',
119         'gestures/velocity_calculator.cc',
120         'gestures/velocity_calculator.h',
121         'ozone/evdev/device_manager_evdev.cc',
122         'ozone/evdev/device_manager_evdev.h',
123         'ozone/evdev/device_manager_udev.cc',
124         'ozone/evdev/device_manager_udev.h',
125         'ozone/evdev/event_converter_evdev.cc',
126         'ozone/evdev/event_converter_evdev.h',
127         'ozone/evdev/event_device_info.cc',
128         'ozone/evdev/event_device_info.h',
129         'ozone/evdev/event_factory_evdev.cc',
130         'ozone/evdev/event_factory_evdev.h',
131         'ozone/evdev/event_modifiers_evdev.cc',
132         'ozone/evdev/event_modifiers_evdev.h',
133         'ozone/evdev/key_event_converter_evdev.cc',
134         'ozone/evdev/key_event_converter_evdev.h',
135         'ozone/evdev/touch_event_converter_evdev.cc',
136         'ozone/evdev/touch_event_converter_evdev.h',
137         'ozone/event_factory_ozone.cc',
138         'ozone/event_factory_ozone.h',
139         'ozone/events_ozone.cc',
140         'platform/platform_event_dispatcher.h',
141         'platform/platform_event_observer.h',
142         'platform/platform_event_source.cc',
143         'platform/platform_event_source.h',
144         'platform/platform_event_types.h',
145         'platform/scoped_event_dispatcher.cc',
146         'platform/scoped_event_dispatcher.h',
147         'platform/x11/x11_event_source.cc',
148         'platform/x11/x11_event_source.h',
149         'win/events_win.cc',
150         'x/events_x.cc',
151       ],
152       'conditions': [
153         # We explicitly enumerate the platforms we _do_ provide native cracking
154         # for here.
155         ['OS=="win" or use_x11==1 or use_ozone==1', {
156           'sources!': [
157             'events_stub.cc',
158           ],
159         }],
160         ['use_x11==1', {
161           'dependencies': [
162             '<(DEPTH)/build/linux/system.gyp:x11',
163           ],
164         }],
165         ['use_glib==1', {
166           'dependencies': [
167             '../../build/linux/system.gyp:glib',
168           ],
169         }],
170         ['use_ozone_evdev==1', {
171           'defines': ['USE_OZONE_EVDEV=1'],
172         }],
173         ['use_ozone_evdev==1 and use_udev==1', {
174           'dependencies': [
175             '<(DEPTH)/build/linux/system.gyp:udev',
176           ],
177         }],
178         ['use_udev==0', {
179           'sources!': [
180             'ozone/evdev/device_manager_udev.cc',
181             'ozone/evdev/device_manager_udev.h',
182           ],
183         }],
184       ],
185     },
186     {
187       'target_name': 'gesture_detection',
188       'type': '<(component)',
189       'dependencies': [
190         '<(DEPTH)/base/base.gyp:base',
191         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
192         '../gfx/gfx.gyp:gfx',
193         '../gfx/gfx.gyp:gfx_geometry',
194         'events_base',
195       ],
196       'defines': [
197         'GESTURE_DETECTION_IMPLEMENTATION',
198       ],
199       'sources': [
200         'gesture_detection/bitset_32.h',
201         'gesture_detection/filtered_gesture_provider.cc',
202         'gesture_detection/filtered_gesture_provider.h',
203         'gesture_detection/gesture_detection_export.h',
204         'gesture_detection/gesture_detector.cc',
205         'gesture_detection/gesture_detector.h',
206         'gesture_detection/gesture_event_data.cc',
207         'gesture_detection/gesture_event_data.h',
208         'gesture_detection/gesture_event_data_packet.cc',
209         'gesture_detection/gesture_event_data_packet.h',
210         'gesture_detection/gesture_config_helper.h',
211         'gesture_detection/gesture_config_helper_aura.cc',
212         'gesture_detection/gesture_config_helper_android.cc',
213         'gesture_detection/gesture_provider.cc',
214         'gesture_detection/gesture_provider.h',
215         'gesture_detection/motion_event.h',
216         'gesture_detection/scale_gesture_detector.cc',
217         'gesture_detection/scale_gesture_detector.h',
218         'gesture_detection/snap_scroll_controller.cc',
219         'gesture_detection/snap_scroll_controller.h',
220         'gesture_detection/touch_disposition_gesture_filter.cc',
221         'gesture_detection/touch_disposition_gesture_filter.h',
222         'gesture_detection/velocity_tracker_state.cc',
223         'gesture_detection/velocity_tracker_state.h',
224         'gesture_detection/velocity_tracker.cc',
225         'gesture_detection/velocity_tracker.h',
226       ],
227       'conditions': [
228         ['use_aura==1', {
229           'dependencies': [
230             'events'
231           ],
232         }],
233         ['use_aura!=1 and OS!="android"', {
234           'sources': [
235             'gesture_detection/gesture_config_helper.cc',
236           ],
237         }],
238       ],
239     },
240     {
241       'target_name': 'events_test_support',
242       'type': 'static_library',
243       'dependencies': [
244         'events',
245         'events_base',
246       ],
247       'sources': [
248         'test/cocoa_test_event_utils.h',
249         'test/cocoa_test_event_utils.mm',
250         'test/events_test_utils.cc',
251         'test/events_test_utils.h',
252         'test/events_test_utils_x11.cc',
253         'test/events_test_utils_x11.h',
254         'test/test_event_handler.cc',
255         'test/test_event_handler.h',
256         'test/test_event_processor.cc',
257         'test/test_event_processor.h',
258         'test/test_event_target.cc',
259         'test/test_event_target.h',
260       ],
261       'conditions': [
262         ['use_x11==1', {
263           'dependencies': [
264             '<(DEPTH)/build/linux/system.gyp:x11',
265           ],
266         }],
267         ['OS=="ios"', {
268           # The cocoa files don't apply to iOS.
269           'sources/': [['exclude', 'cocoa']],
270         }],
271       ],
272     },
273     {
274       'target_name': 'events_unittests',
275       'type': '<(gtest_target_type)',
276       'dependencies': [
277         '<(DEPTH)/base/base.gyp:base',
278         '<(DEPTH)/base/base.gyp:run_all_unittests',
279         '<(DEPTH)/base/base.gyp:test_support_base',
280         '<(DEPTH)/testing/gtest.gyp:gtest',
281         '../gfx/gfx.gyp:gfx',
282         '../gfx/gfx.gyp:gfx_geometry',
283         'dom4_keycode_converter',
284         'events',
285         'events_base',
286         'events_test_support',
287         'gesture_detection'
288       ],
289       'sources': [
290         'cocoa/cocoa_event_utils_unittest.mm',
291         'event_dispatcher_unittest.cc',
292         'event_processor_unittest.cc',
293         'event_rewriter_unittest.cc',
294         'event_unittest.cc',
295         'gestures/velocity_calculator_unittest.cc',
296         'gesture_detection/bitset_32_unittest.cc',
297         'gesture_detection/gesture_provider_unittest.cc',
298         'gesture_detection/mock_motion_event.h',
299         'gesture_detection/mock_motion_event.cc',
300         'gesture_detection/velocity_tracker_unittest.cc',
301         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
302         'keycodes/dom4/keycode_converter_unittest.cc',
303         'latency_info_unittest.cc',
304         'ozone/evdev/key_event_converter_evdev_unittest.cc',
305         'ozone/evdev/touch_event_converter_evdev_unittest.cc',
306         'platform/platform_event_source_unittest.cc',
307         'x/events_x_unittest.cc',
308       ],
309       'conditions': [
310         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
311         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
312           'dependencies': [
313             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
314           ],
315         }],
316         # Exclude tests that rely on event_utils.h for platforms that do not
317         # provide native cracking, i.e., platforms that use events_stub.cc.
318         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
319           'sources!': [
320             'event_unittest.cc',
321           ],
322         }],
323         ['OS == "android" and gtest_target_type == "shared_library"', {
324           'dependencies': [
325             '../../testing/android/native_test.gyp:native_test_native_code',
326           ],
327         }],
328       ],
329     },
330   ],
331   'conditions': [
332     # Special target to wrap a gtest_target_type==shared_library
333     # ui_unittests into an android apk for execution.
334     # See base.gyp for TODO(jrg)s about this strategy.
335     ['OS == "android" and gtest_target_type == "shared_library"', {
336       'targets': [
337         {
338           'target_name': 'events_unittests_apk',
339           'type': 'none',
340           'dependencies': [
341             'events_unittests',
342           ],
343           'variables': {
344             'test_suite_name': 'events_unittests',
345             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)events_unittests<(SHARED_LIB_SUFFIX)',
346           },
347           'includes': [ '../../build/apk_test.gypi' ],
348         },
349       ],
350     }],
351   ],
352 }