Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob5a64fd7c926b4e0812eb53f26faf874f48d48ff6
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.
6   'target_defaults': {
7     'conditions': [
8       ['mojo_shell_debug_url != ""', {
9         'defines': [
10           'MOJO_SHELL_DEBUG=1',
11           'MOJO_SHELL_DEBUG_URL="<(mojo_shell_debug_url)"',
12          ],
13       }],
14     ],
15   },
16   'variables': {
17     'chromium_code': 1,
18     'mojo_shell_debug_url%': "",
19   },
20   'includes': [
21     'mojo_apps.gypi',
22     'mojo_examples.gypi',
23     'mojo_public.gypi',
24     'mojo_services.gypi',
25   ],
26   'targets': [
27     {
28       'target_name': 'mojo',
29       'type': 'none',
30       'dependencies': [
31         'mojo_bindings',
32         'mojo_compositor_app',
33         'mojo_common_lib',
34         'mojo_common_unittests',
35         'mojo_js',
36         'mojo_js_unittests',
37         'mojo_public_test_support',
38         'mojo_public_bindings_unittests',
39         'mojo_public_environment_unittests',
40         'mojo_public_system_perftests',
41         'mojo_public_system_unittests',
42         'mojo_public_utility_unittests',
43         'mojo_sample_app',
44         'mojo_shell',
45         'mojo_shell_lib',
46         'mojo_shell_unittests',
47         'mojo_system',
48         'mojo_system_impl',
49         'mojo_system_unittests',
50         'mojo_utility',
51       ],
52       'conditions': [
53         ['use_aura==1', {
54           'dependencies': [
55             'mojo_aura_demo',
56           ],
57         }],
58       ]
59     },
60     {
61       'target_name': 'mojo_run_all_unittests',
62       'type': 'static_library',
63       'dependencies': [
64         '../base/base.gyp:base',
65         '../base/base.gyp:test_support_base',
66         '../testing/gtest.gyp:gtest',
67         'mojo_system',
68         'mojo_system_impl',
69       ],
70       'sources': [
71         'common/test/run_all_unittests.cc',
72       ],
73     },
74     {
75       'target_name': 'mojo_run_all_perftests',
76       'type': 'static_library',
77       'dependencies': [
78         '../base/base.gyp:test_support_base',
79         'mojo_system',
80         'mojo_system_impl',
81       ],
82       'sources': [
83         'common/test/run_all_perftests.cc',
84       ],
85     },
86     {
87       'target_name': 'mojo_system_impl',
88       'type': '<(component)',
89       'dependencies': [
90         'mojo_system',
91         '../base/base.gyp:base',
92       ],
93       'defines': [
94         'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
95       ],
96       'sources': [
97         'system/channel.cc',
98         'system/channel.h',
99         'system/constants.h',
100         'system/core_impl.cc',
101         'system/core_impl.h',
102         'system/data_pipe.cc',
103         'system/data_pipe.h',
104         'system/data_pipe_consumer_dispatcher.cc',
105         'system/data_pipe_consumer_dispatcher.h',
106         'system/data_pipe_producer_dispatcher.cc',
107         'system/data_pipe_producer_dispatcher.h',
108         'system/dispatcher.cc',
109         'system/dispatcher.h',
110         'system/embedder/embedder.cc',
111         'system/embedder/embedder.h',
112         'system/embedder/platform_channel_pair.cc',
113         'system/embedder/platform_channel_pair.h',
114         'system/embedder/platform_channel_pair_posix.cc',
115         'system/embedder/platform_handle.cc',
116         'system/embedder/platform_handle.h',
117         'system/embedder/scoped_platform_handle.h',
118         'system/local_data_pipe.cc',
119         'system/local_data_pipe.h',
120         'system/local_message_pipe_endpoint.cc',
121         'system/local_message_pipe_endpoint.h',
122         'system/memory.cc',
123         'system/memory.h',
124         'system/message_in_transit.cc',
125         'system/message_in_transit.h',
126         'system/message_pipe.cc',
127         'system/message_pipe.h',
128         'system/message_pipe_dispatcher.cc',
129         'system/message_pipe_dispatcher.h',
130         'system/message_pipe_endpoint.cc',
131         'system/message_pipe_endpoint.h',
132         'system/proxy_message_pipe_endpoint.cc',
133         'system/proxy_message_pipe_endpoint.h',
134         'system/raw_channel.h',
135         'system/raw_channel_posix.cc',
136         'system/raw_channel_win.cc',
137         'system/simple_dispatcher.cc',
138         'system/simple_dispatcher.h',
139         'system/waiter.cc',
140         'system/waiter.h',
141         'system/waiter_list.cc',
142         'system/waiter_list.h',
143         # Test-only code:
144         # TODO(vtl): It's a little unfortunate that these end up in the same
145         # component as non-test-only code. In the static build, this code should
146         # hopefully be dead-stripped.
147         'system/embedder/test_embedder.cc',
148         'system/embedder/test_embedder.h',
149       ],
150     },
151     {
152       'target_name': 'mojo_system_unittests',
153       'type': 'executable',
154       'dependencies': [
155         '../base/base.gyp:run_all_unittests',
156         '../testing/gtest.gyp:gtest',
157         'mojo_common_test_support',
158         'mojo_system',
159         'mojo_system_impl',
160       ],
161       'sources': [
162         'system/core_impl_unittest.cc',
163         'system/core_test_base.cc',
164         'system/core_test_base.h',
165         'system/data_pipe_unittest.cc',
166         'system/dispatcher_unittest.cc',
167         'system/embedder/embedder_unittest.cc',
168         'system/local_data_pipe_unittest.cc',
169         'system/message_pipe_dispatcher_unittest.cc',
170         'system/message_pipe_unittest.cc',
171         'system/multiprocess_message_pipe_unittest.cc',
172         'system/raw_channel_posix_unittest.cc',
173         'system/remote_message_pipe_posix_unittest.cc',
174         'system/simple_dispatcher_unittest.cc',
175         'system/test_utils.cc',
176         'system/test_utils.h',
177         'system/waiter_list_unittest.cc',
178         'system/waiter_test_utils.cc',
179         'system/waiter_test_utils.h',
180         'system/waiter_unittest.cc',
181       ],
182     },
183     {
184       'target_name': 'mojo_gles2',
185       'type': '<(component)',
186       'dependencies': [
187         '../gpu/gpu.gyp:gles2_c_lib',
188       ],
189       'defines': [
190         'MOJO_GLES2_IMPLEMENTATION',
191       ],
192       'sources': [
193         'gles2/gles2.cc',
194       ],
195     },
196     {
197       'target_name': 'mojo_common_lib',
198       'type': '<(component)',
199       'defines': [
200         'MOJO_COMMON_IMPLEMENTATION',
201       ],
202       'dependencies': [
203         '../base/base.gyp:base',
204         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
205         'mojo_system',
206       ],
207       'sources': [
208         'common/common_type_converters.cc',
209         'common/common_type_converters.h',
210         'common/handle_watcher.cc',
211         'common/handle_watcher.h',
212         'common/message_pump_mojo.cc',
213         'common/message_pump_mojo.h',
214         'common/message_pump_mojo_handler.h',
215       ],
216       'conditions': [
217         ['OS == "win"', {
218           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
219           'msvs_disabled_warnings': [
220             4267,
221           ],
222         }],
223       ],
224     },
225     {
226       'target_name': 'mojo_common_test_support',
227       'type': 'static_library',
228       'dependencies': [
229         '../base/base.gyp:base',
230         '../base/base.gyp:test_support_base',
231         '../testing/gtest.gyp:gtest',
232         'mojo_system',
233         'mojo_system_impl',
234       ],
235       'sources': [
236         'common/test/multiprocess_test_base.cc',
237         'common/test/multiprocess_test_base.h',
238       ],
239     },
240     {
241       'target_name': 'mojo_common_unittests',
242       'type': 'executable',
243       'dependencies': [
244         '../base/base.gyp:base',
245         '../base/base.gyp:base_message_loop_tests',
246         '../testing/gtest.gyp:gtest',
247         'mojo_bindings',
248         'mojo_environment_chromium',
249         'mojo_common_lib',
250         'mojo_common_test_support',
251         'mojo_public_test_support',
252         'mojo_run_all_unittests',
253         'mojo_system',
254         'mojo_system_impl',
255       ],
256       'sources': [
257         'common/common_type_converters_unittest.cc',
258         'common/handle_watcher_unittest.cc',
259         'common/message_pump_mojo_unittest.cc',
260         'common/test/multiprocess_test_base_unittest.cc',
261       ],
262       'conditions': [
263         ['OS == "win"', {
264           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
265           'msvs_disabled_warnings': [
266             4267,
267           ],
268         }],
269       ],
270     },
271     {
272       'target_name': 'mojo_environment_chromium',
273       'type': 'static_library',
274       'dependencies': [
275         'mojo_environment_chromium_impl',
276       ],
277       'sources': [
278         'environment/default_async_waiter.cc',
279         'environment/buffer_tls.cc',
280         'environment/environment.cc',
281       ],
282       'include_dirs': [
283         '..',
284       ],
285       'export_dependent_settings': [
286         'mojo_environment_chromium_impl',
287       ],
288     },
289     {
290       'target_name': 'mojo_environment_chromium_impl',
291       'type': '<(component)',
292       'defines': [
293         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
294       ],
295       'dependencies': [
296         '../base/base.gyp:base',
297         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
298         'mojo_common_lib'
299       ],
300       'sources': [
301         'environment/default_async_waiter_impl.cc',
302         'environment/default_async_waiter_impl.h',
303         'environment/buffer_tls_impl.cc',
304         'environment/buffer_tls_impl.h',
305       ],
306       'include_dirs': [
307         '..',
308       ],
309     },
310     {
311       'target_name': 'mojo_shell_lib',
312       'type': 'static_library',
313       'dependencies': [
314         '../base/base.gyp:base',
315         '../net/net.gyp:net',
316         '../url/url.gyp:url_lib',
317         'mojo_shell_bindings',
318         'mojo_system',
319         'mojo_system_impl',
320         'mojo_native_viewport_service',
321       ],
322       'sources': [
323         'shell/context.cc',
324         'shell/context.h',
325         'shell/dynamic_service_loader.cc',
326         'shell/dynamic_service_loader.h',
327         'shell/init.cc',
328         'shell/init.h',
329         'shell/loader.cc',
330         'shell/loader.h',
331         'shell/network_delegate.cc',
332         'shell/network_delegate.h',
333         'shell/run.cc',
334         'shell/run.h',
335         'shell/service_manager.cc',
336         'shell/service_manager.h',
337         'shell/storage.cc',
338         'shell/storage.h',
339         'shell/switches.cc',
340         'shell/switches.h',
341         'shell/task_runners.cc',
342         'shell/task_runners.h',
343         'shell/url_request_context_getter.cc',
344         'shell/url_request_context_getter.h',
345       ],
346       'conditions': [
347         ['OS == "win"', {
348           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
349           'msvs_disabled_warnings': [
350             4267,
351           ],
352         }],
353       ],
354     },
355     {
356       'target_name': 'mojo_shell_bindings',
357       'type': 'static_library',
358       'sources': [
359         'shell/shell.mojom',
360       ],
361       'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
362       'export_dependent_settings': [
363         'mojo_bindings',
364         'mojo_system',
365       ],
366     },
367     {
368       'target_name': 'mojo_shell',
369       'type': 'executable',
370       'dependencies': [
371         '../base/base.gyp:base',
372         '../ui/gl/gl.gyp:gl',
373         '../url/url.gyp:url_lib',
374         'mojo_common_lib',
375         'mojo_environment_chromium',
376         'mojo_shell_lib',
377         'mojo_system',
378         'mojo_system_impl',
379       ],
380       'sources': [
381         'shell/desktop/mojo_main.cc',
382       ],
383       'conditions': [
384         ['OS == "win"', {
385           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
386           'msvs_disabled_warnings': [
387             4267,
388           ],
389         }],
390       ],
391     },
392     {
393       'target_name': 'mojo_shell_unittests',
394       'type': 'executable',
395       'dependencies': [
396         '../base/base.gyp:base',
397         '../testing/gtest.gyp:gtest',
398         'mojo_common_lib',
399         'mojo_environment_chromium',
400         'mojo_run_all_unittests',
401         'mojo_shell_lib',
402       ],
403       'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
404       'sources': [
405         'shell/service_manager_unittest.cc',
406         'shell/test.mojom',
407       ],
408     },
409   ],
410   'conditions': [
411     ['OS=="android"', {
412       'targets': [
413         {
414           'target_name': 'mojo_native_viewport_java',
415           'type': 'none',
416           'dependencies': [
417             '../base/base.gyp:base_java',
418           ],
419           'variables': {
420             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
421           },
422           'includes': [ '../build/java.gypi' ],
423         },
424         {
425           'target_name': 'mojo_java_set_jni_headers',
426           'type': 'none',
427           'variables': {
428             'jni_gen_package': 'mojo',
429             'jni_generator_ptr_type': 'long',
430             'input_java_class': 'java/util/HashSet.class',
431           },
432           'includes': [ '../build/jar_file_jni_generator.gypi' ],
433         },
434         {
435           'target_name': 'mojo_jni_headers',
436           'type': 'none',
437           'dependencies': [
438             'mojo_java_set_jni_headers',
439           ],
440           'sources': [
441             'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java',
442             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
443           ],
444           'variables': {
445             'jni_gen_package': 'mojo',
446             'jni_generator_ptr_type': 'long',
447          },
448           'includes': [ '../build/jni_generator.gypi' ],
449         },
450         {
451           'target_name': 'libmojo_shell',
452           'type': 'shared_library',
453           'dependencies': [
454             '../base/base.gyp:base',
455             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
456             '../ui/gfx/gfx.gyp:gfx',
457             '../ui/gfx/gfx.gyp:gfx_geometry',
458             '../ui/gl/gl.gyp:gl',
459             'mojo_common_lib',
460             'mojo_environment_chromium',
461             'mojo_jni_headers',
462             'mojo_shell_bindings',
463             'mojo_shell_lib',
464           ],
465           'sources': [
466             'shell/android/library_loader.cc',
467             'shell/android/mojo_main.cc',
468             'shell/android/mojo_main.h',
469           ],
470         },
471         {
472           'target_name': 'mojo_shell_apk',
473           'type': 'none',
474           'dependencies': [
475             '../base/base.gyp:base_java',
476             '../net/net.gyp:net_java',
477             'mojo_native_viewport_java',
478             'libmojo_shell',
479           ],
480           'variables': {
481             'apk_name': 'MojoShell',
482             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
483             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
484             'native_lib_target': 'libmojo_shell',
485           },
486           'includes': [ '../build/java_apk.gypi' ],
487         }
488       ],
489     }],
490   ],