Upstream version 7.35.139.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_data_manager.cc',
58         'x/device_data_manager.h',
59         'x/device_list_cache_x.cc',
60         'x/device_list_cache_x.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         'linux/text_edit_command_auralinux.cc',
152         'linux/text_edit_command_auralinux.h',
153         'linux/text_edit_key_bindings_delegate_auralinux.cc',
154         'linux/text_edit_key_bindings_delegate_auralinux.h',
155       ],
156       'conditions': [
157         # We explicitly enumerate the platforms we _do_ provide native cracking
158         # for here.
159         ['OS=="win" or use_x11==1 or use_ozone==1', {
160           'sources!': [
161             'events_stub.cc',
162           ],
163         }],
164         ['chromeos==1', {
165           'sources!': [
166             'linux/text_edit_command_auralinux.cc',
167             'linux/text_edit_command_auralinux.h',
168             'linux/text_edit_key_bindings_delegate_auralinux.cc',
169             'linux/text_edit_key_bindings_delegate_auralinux.h',
170           ],
171         }],
172         ['use_x11==1', {
173           'dependencies': [
174             '<(DEPTH)/build/linux/system.gyp:x11',
175           ],
176         }],
177         ['use_glib==1', {
178           'dependencies': [
179             '../../build/linux/system.gyp:glib',
180           ],
181         }],
182         ['use_ozone_evdev==1', {
183           'defines': ['USE_OZONE_EVDEV=1'],
184         }],
185         ['use_ozone_evdev==1 and use_udev==1', {
186           'dependencies': [
187             '<(DEPTH)/build/linux/system.gyp:udev',
188           ],
189         }],
190         ['use_udev==0', {
191           'sources!': [
192             'ozone/evdev/device_manager_udev.cc',
193             'ozone/evdev/device_manager_udev.h',
194           ],
195         }],
196       ],
197     },
198     {
199       'target_name': 'gesture_detection',
200       'type': '<(component)',
201       'dependencies': [
202         '<(DEPTH)/base/base.gyp:base',
203         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
204         '../gfx/gfx.gyp:gfx',
205         '../gfx/gfx.gyp:gfx_geometry',
206         'events_base',
207       ],
208       'defines': [
209         'GESTURE_DETECTION_IMPLEMENTATION',
210       ],
211       'sources': [
212         'gesture_detection/bitset_32.h',
213         'gesture_detection/filtered_gesture_provider.cc',
214         'gesture_detection/filtered_gesture_provider.h',
215         'gesture_detection/gesture_detection_export.h',
216         'gesture_detection/gesture_detector.cc',
217         'gesture_detection/gesture_detector.h',
218         'gesture_detection/gesture_event_data.cc',
219         'gesture_detection/gesture_event_data.h',
220         'gesture_detection/gesture_event_data_packet.cc',
221         'gesture_detection/gesture_event_data_packet.h',
222         'gesture_detection/gesture_config_helper.h',
223         'gesture_detection/gesture_config_helper_aura.cc',
224         'gesture_detection/gesture_config_helper_android.cc',
225         'gesture_detection/gesture_provider.cc',
226         'gesture_detection/gesture_provider.h',
227         'gesture_detection/motion_event.h',
228         'gesture_detection/scale_gesture_detector.cc',
229         'gesture_detection/scale_gesture_detector.h',
230         'gesture_detection/snap_scroll_controller.cc',
231         'gesture_detection/snap_scroll_controller.h',
232         'gesture_detection/touch_disposition_gesture_filter.cc',
233         'gesture_detection/touch_disposition_gesture_filter.h',
234         'gesture_detection/velocity_tracker_state.cc',
235         'gesture_detection/velocity_tracker_state.h',
236         'gesture_detection/velocity_tracker.cc',
237         'gesture_detection/velocity_tracker.h',
238       ],
239       'conditions': [
240         ['use_aura==1', {
241           'dependencies': [
242             'events'
243           ],
244         }],
245         ['use_aura!=1 and OS!="android"', {
246           'sources': [
247             'gesture_detection/gesture_config_helper.cc',
248           ],
249         }],
250       ],
251     },
252     {
253       'target_name': 'events_test_support',
254       'type': 'static_library',
255       'dependencies': [
256         'events',
257         'events_base',
258       ],
259       'sources': [
260         'test/cocoa_test_event_utils.h',
261         'test/cocoa_test_event_utils.mm',
262         'test/events_test_utils.cc',
263         'test/events_test_utils.h',
264         'test/events_test_utils_x11.cc',
265         'test/events_test_utils_x11.h',
266         'test/test_event_handler.cc',
267         'test/test_event_handler.h',
268         'test/test_event_processor.cc',
269         'test/test_event_processor.h',
270         'test/test_event_target.cc',
271         'test/test_event_target.h',
272       ],
273       'conditions': [
274         ['use_x11==1', {
275           'dependencies': [
276             '<(DEPTH)/build/linux/system.gyp:x11',
277           ],
278         }],
279         ['OS=="ios"', {
280           # The cocoa files don't apply to iOS.
281           'sources/': [['exclude', 'cocoa']],
282         }],
283       ],
284     },
285     {
286       'target_name': 'events_unittests',
287       'type': '<(gtest_target_type)',
288       'dependencies': [
289         '<(DEPTH)/base/base.gyp:base',
290         '<(DEPTH)/base/base.gyp:run_all_unittests',
291         '<(DEPTH)/base/base.gyp:test_support_base',
292         '<(DEPTH)/testing/gtest.gyp:gtest',
293         '../gfx/gfx.gyp:gfx',
294         '../gfx/gfx.gyp:gfx_geometry',
295         'dom4_keycode_converter',
296         'events',
297         'events_base',
298         'events_test_support',
299         'gesture_detection'
300       ],
301       'sources': [
302         'cocoa/cocoa_event_utils_unittest.mm',
303         'event_dispatcher_unittest.cc',
304         'event_processor_unittest.cc',
305         'event_rewriter_unittest.cc',
306         'event_unittest.cc',
307         'gestures/velocity_calculator_unittest.cc',
308         'gesture_detection/bitset_32_unittest.cc',
309         'gesture_detection/gesture_provider_unittest.cc',
310         'gesture_detection/mock_motion_event.h',
311         'gesture_detection/mock_motion_event.cc',
312         'gesture_detection/velocity_tracker_unittest.cc',
313         'gesture_detection/touch_disposition_gesture_filter_unittest.cc',
314         'keycodes/dom4/keycode_converter_unittest.cc',
315         'latency_info_unittest.cc',
316         'ozone/evdev/key_event_converter_evdev_unittest.cc',
317         'ozone/evdev/touch_event_converter_evdev_unittest.cc',
318         'platform/platform_event_source_unittest.cc',
319         'x/events_x_unittest.cc',
320       ],
321       'conditions': [
322         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
323         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
324           'dependencies': [
325             '<(DEPTH)/base/allocator/allocator.gyp:allocator',
326           ],
327         }],
328         # Exclude tests that rely on event_utils.h for platforms that do not
329         # provide native cracking, i.e., platforms that use events_stub.cc.
330         ['OS!="win" and use_x11!=1 and use_ozone!=1', {
331           'sources!': [
332             'event_unittest.cc',
333           ],
334         }],
335         ['OS == "android" and gtest_target_type == "shared_library"', {
336           'dependencies': [
337             '../../testing/android/native_test.gyp:native_test_native_code',
338           ],
339         }],
340       ],
341     },
342   ],
343   'conditions': [
344     # Special target to wrap a gtest_target_type==shared_library
345     # ui_unittests into an android apk for execution.
346     # See base.gyp for TODO(jrg)s about this strategy.
347     ['OS == "android" and gtest_target_type == "shared_library"', {
348       'targets': [
349         {
350           'target_name': 'events_unittests_apk',
351           'type': 'none',
352           'dependencies': [
353             'events_unittests',
354           ],
355           'variables': {
356             'test_suite_name': 'events_unittests',
357             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)events_unittests<(SHARED_LIB_SUFFIX)',
358           },
359           'includes': [ '../../build/apk_test.gypi' ],
360         },
361       ],
362     }],
363   ],
364 }