Disable signin-to-Chrome when using Guest profile.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob6805d2868e24711d621c90a9333ed5f7847b9ba9
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_apps_js_unittests',
32         'mojo_bindings',
33         'mojo_compositor_app',
34         'mojo_common_lib',
35         'mojo_common_unittests',
36         'mojo_js',
37         'mojo_js_unittests',
38         'mojo_public_test_utils',
39         'mojo_public_bindings_unittests',
40         'mojo_public_environment_unittests',
41         'mojo_public_system_perftests',
42         'mojo_public_system_unittests',
43         'mojo_public_utility_unittests',
44         'mojo_sample_app',
45         'mojo_service_manager',
46         'mojo_service_manager_unittests',
47         'mojo_shell',
48         'mojo_shell_lib',
49         'mojo_system',
50         'mojo_system_impl',
51         'mojo_system_unittests',
52         'mojo_utility',
53       ],
54       'conditions': [
55         ['use_aura==1', {
56           'dependencies': [
57             'mojo_aura_demo',
58             'mojo_launcher',
59             'mojo_view_manager',
60           ],
61         }],
62       ]
63     },
64     {
65       'target_name': 'mojo_run_all_unittests',
66       'type': 'static_library',
67       'dependencies': [
68         '../base/base.gyp:base',
69         '../base/base.gyp:test_support_base',
70         '../testing/gtest.gyp:gtest',
71         'mojo_system',
72         'mojo_system_impl',
73         'mojo_test_support',
74         'mojo_test_support_impl',
75       ],
76       'sources': [
77         'common/test/run_all_unittests.cc',
78       ],
79     },
80     {
81       'target_name': 'mojo_run_all_perftests',
82       'type': 'static_library',
83       'dependencies': [
84         '../base/base.gyp:test_support_base',
85         'mojo_system',
86         'mojo_system_impl',
87         'mojo_test_support',
88         'mojo_test_support_impl',
89       ],
90       'sources': [
91         'common/test/run_all_perftests.cc',
92       ],
93     },
94     {
95       'target_name': 'mojo_system_impl',
96       'type': '<(component)',
97       'dependencies': [
98         'mojo_system',
99         '../base/base.gyp:base',
100         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
101       ],
102       'defines': [
103         'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
104       ],
105       'sources': [
106         'embedder/embedder.cc',
107         'embedder/embedder.h',
108         'embedder/platform_channel_pair.cc',
109         'embedder/platform_channel_pair.h',
110         'embedder/platform_channel_pair_posix.cc',
111         'embedder/platform_channel_pair_win.cc',
112         'embedder/platform_handle.cc',
113         'embedder/platform_handle.h',
114         'embedder/scoped_platform_handle.h',
115         'system/channel.cc',
116         'system/channel.h',
117         'system/constants.h',
118         'system/core_impl.cc',
119         'system/core_impl.h',
120         'system/data_pipe.cc',
121         'system/data_pipe.h',
122         'system/data_pipe_consumer_dispatcher.cc',
123         'system/data_pipe_consumer_dispatcher.h',
124         'system/data_pipe_producer_dispatcher.cc',
125         'system/data_pipe_producer_dispatcher.h',
126         'system/dispatcher.cc',
127         'system/dispatcher.h',
128         'system/local_data_pipe.cc',
129         'system/local_data_pipe.h',
130         'system/local_message_pipe_endpoint.cc',
131         'system/local_message_pipe_endpoint.h',
132         'system/memory.cc',
133         'system/memory.h',
134         'system/message_in_transit.cc',
135         'system/message_in_transit.h',
136         'system/message_in_transit_queue.cc',
137         'system/message_in_transit_queue.h',
138         'system/message_pipe.cc',
139         'system/message_pipe.h',
140         'system/message_pipe_dispatcher.cc',
141         'system/message_pipe_dispatcher.h',
142         'system/message_pipe_endpoint.cc',
143         'system/message_pipe_endpoint.h',
144         'system/proxy_message_pipe_endpoint.cc',
145         'system/proxy_message_pipe_endpoint.h',
146         'system/raw_channel.cc',
147         'system/raw_channel.h',
148         'system/raw_channel_posix.cc',
149         'system/raw_channel_win.cc',
150         'system/simple_dispatcher.cc',
151         'system/simple_dispatcher.h',
152         'system/waiter.cc',
153         'system/waiter.h',
154         'system/waiter_list.cc',
155         'system/waiter_list.h',
156         # Test-only code:
157         # TODO(vtl): It's a little unfortunate that these end up in the same
158         # component as non-test-only code. In the static build, this code should
159         # hopefully be dead-stripped.
160         'embedder/test_embedder.cc',
161         'embedder/test_embedder.h',
162       ],
163     },
164     {
165       'target_name': 'mojo_system_unittests',
166       'type': 'executable',
167       'dependencies': [
168         '../base/base.gyp:run_all_unittests',
169         '../testing/gtest.gyp:gtest',
170         'mojo_common_test_support',
171         'mojo_system',
172         'mojo_system_impl',
173       ],
174       'sources': [
175         'embedder/embedder_unittest.cc',
176         'system/core_impl_unittest.cc',
177         'system/core_test_base.cc',
178         'system/core_test_base.h',
179         'system/data_pipe_unittest.cc',
180         'system/dispatcher_unittest.cc',
181         'system/local_data_pipe_unittest.cc',
182         'system/message_pipe_dispatcher_unittest.cc',
183         'system/message_pipe_unittest.cc',
184         'system/multiprocess_message_pipe_unittest.cc',
185         'system/raw_channel_unittest.cc',
186         'system/remote_message_pipe_unittest.cc',
187         'system/simple_dispatcher_unittest.cc',
188         'system/test_utils.cc',
189         'system/test_utils.h',
190         'system/waiter_list_unittest.cc',
191         'system/waiter_test_utils.cc',
192         'system/waiter_test_utils.h',
193         'system/waiter_unittest.cc',
194       ],
195     },
196     {
197       'target_name': 'mojo_gles2_impl',
198       'type': '<(component)',
199       'dependencies': [
200         '../base/base.gyp:base',
201         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
202         '../gpu/gpu.gyp:command_buffer_client',
203         '../gpu/gpu.gyp:command_buffer_common',
204         '../gpu/gpu.gyp:gles2_cmd_helper',
205         '../gpu/gpu.gyp:gles2_implementation',
206         'mojo_gles2',
207         'mojo_gles2_bindings',
208         'mojo_environment_chromium',
209       ],
210       'defines': [
211         'MOJO_GLES2_IMPL_IMPLEMENTATION',
212       ],
213       'sources': [
214         'gles2/command_buffer_client_impl.cc',
215         'gles2/command_buffer_client_impl.h',
216         'gles2/gles2_impl_export.h',
217         'gles2/gles2_support_impl.cc',
218         'gles2/gles2_support_impl.h',
219         'gles2/gles2_context.cc',
220         'gles2/gles2_context.h',
221       ],
222     },
223     {
224       'target_name': 'mojo_test_support_impl',
225       'type': 'static_library',
226       'dependencies': [
227         '../base/base.gyp:base',
228       ],
229       'sources': [
230         'common/test/test_support_impl.cc',
231         'common/test/test_support_impl.h',
232       ],
233     },
234     {
235       'target_name': 'mojo_common_lib',
236       'type': '<(component)',
237       'defines': [
238         'MOJO_COMMON_IMPLEMENTATION',
239       ],
240       'dependencies': [
241         '../base/base.gyp:base',
242         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
243         'mojo_system',
244       ],
245       'sources': [
246         'common/common_type_converters.cc',
247         'common/common_type_converters.h',
248         'common/handle_watcher.cc',
249         'common/handle_watcher.h',
250         'common/message_pump_mojo.cc',
251         'common/message_pump_mojo.h',
252         'common/message_pump_mojo_handler.h',
253         'common/time_helper.cc',
254         'common/time_helper.h',
255       ],
256     },
257     {
258       'target_name': 'mojo_common_test_support',
259       'type': 'static_library',
260       'dependencies': [
261         '../base/base.gyp:base',
262         '../base/base.gyp:test_support_base',
263         '../testing/gtest.gyp:gtest',
264         'mojo_system',
265         'mojo_system_impl',
266       ],
267       'sources': [
268         'common/test/multiprocess_test_helper.cc',
269         'common/test/multiprocess_test_helper.h',
270         'common/test/test_utils.h',
271         'common/test/test_utils_posix.cc',
272         'common/test/test_utils_win.cc',
273       ],
274     },
275     {
276       'target_name': 'mojo_common_unittests',
277       'type': 'executable',
278       'dependencies': [
279         '../base/base.gyp:base',
280         '../base/base.gyp:base_message_loop_tests',
281         '../testing/gtest.gyp:gtest',
282         'mojo_bindings',
283         'mojo_environment_chromium',
284         'mojo_common_lib',
285         'mojo_common_test_support',
286         'mojo_public_test_utils',
287         'mojo_run_all_unittests',
288         'mojo_system',
289         'mojo_system_impl',
290       ],
291       'sources': [
292         'common/common_type_converters_unittest.cc',
293         'common/handle_watcher_unittest.cc',
294         'common/message_pump_mojo_unittest.cc',
295         'common/test/multiprocess_test_helper_unittest.cc',
296       ],
297     },
298     {
299       'target_name': 'mojo_environment_chromium',
300       'type': 'static_library',
301       'dependencies': [
302         'mojo_environment_chromium_impl',
303       ],
304       'sources': [
305         'environment/default_async_waiter.cc',
306         'environment/buffer_tls.cc',
307         'environment/environment.cc',
308       ],
309       'include_dirs': [
310         '..',
311       ],
312       'export_dependent_settings': [
313         'mojo_environment_chromium_impl',
314       ],
315     },
316     {
317       'target_name': 'mojo_environment_chromium_impl',
318       'type': '<(component)',
319       'defines': [
320         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
321       ],
322       'dependencies': [
323         '../base/base.gyp:base',
324         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
325         'mojo_common_lib'
326       ],
327       'sources': [
328         'environment/default_async_waiter_impl.cc',
329         'environment/default_async_waiter_impl.h',
330         'environment/buffer_tls_impl.cc',
331         'environment/buffer_tls_impl.h',
332       ],
333       'include_dirs': [
334         '..',
335       ],
336     },
337     {
338       'target_name': 'mojo_service_manager',
339       'type': 'static_library',
340       'dependencies': [
341         '../base/base.gyp:base',
342         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
343         '../net/net.gyp:net',
344         '../url/url.gyp:url_lib',
345         'mojo_shell_bindings',
346       ],
347       'sources': [
348         'service_manager/service_loader.h',
349         'service_manager/service_manager.cc',
350         'service_manager/service_manager.h',
351       ],
352       'export_dependent_settings': [
353         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
354       ],
355     },
356     {
357       'target_name': 'mojo_shell_lib',
358       'type': 'static_library',
359       'dependencies': [
360         '../base/base.gyp:base',
361         '../base/base.gyp:base_static',
362         '../net/net.gyp:net',
363         '../url/url.gyp:url_lib',
364         'mojo_gles2_impl',
365         'mojo_shell_bindings',
366         'mojo_service_manager',
367         'mojo_system',
368         'mojo_system_impl',
369         'mojo_native_viewport_service',
370       ],
371       'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
372       'sources': [
373         'shell/app_child_process.cc',
374         'shell/app_child_process.h',
375         'shell/app_child_process.mojom',
376         'shell/app_child_process_host.cc',
377         'shell/app_child_process_host.h',
378         'shell/child_process.cc',
379         'shell/child_process.h',
380         'shell/child_process_host.cc',
381         'shell/child_process_host.h',
382         'shell/context.cc',
383         'shell/context.h',
384         'shell/dynamic_service_loader.cc',
385         'shell/dynamic_service_loader.h',
386         'shell/dynamic_service_runner.h',
387         'shell/init.cc',
388         'shell/init.h',
389         'shell/in_process_dynamic_service_runner.cc',
390         'shell/in_process_dynamic_service_runner.h',
391         'shell/keep_alive.cc',
392         'shell/keep_alive.h',
393         'shell/loader.cc',
394         'shell/loader.h',
395         'shell/network_delegate.cc',
396         'shell/network_delegate.h',
397         'shell/out_of_process_dynamic_service_runner.cc',
398         'shell/out_of_process_dynamic_service_runner.h',
399         'shell/run.cc',
400         'shell/run.h',
401         'shell/storage.cc',
402         'shell/storage.h',
403         'shell/switches.cc',
404         'shell/switches.h',
405         'shell/task_runners.cc',
406         'shell/task_runners.h',
407         'shell/test_child_process.cc',
408         'shell/test_child_process.h',
409         'shell/url_request_context_getter.cc',
410         'shell/url_request_context_getter.h',
411       ],
412     },
413     {
414       'target_name': 'mojo_shell',
415       'type': 'executable',
416       'dependencies': [
417         '../base/base.gyp:base',
418         '../ui/gl/gl.gyp:gl',
419         '../url/url.gyp:url_lib',
420         'mojo_common_lib',
421         'mojo_environment_chromium',
422         'mojo_shell_bindings',
423         'mojo_shell_lib',
424         'mojo_system',
425         'mojo_system_impl',
426       ],
427       'sources': [
428         'shell/desktop/mojo_main.cc',
429       ],
430     },
431     {
432       'target_name': 'mojo_service_manager_unittests',
433       'type': 'executable',
434       'dependencies': [
435         '../base/base.gyp:base',
436         '../testing/gtest.gyp:gtest',
437         'mojo_bindings',
438         'mojo_environment_standalone',
439         'mojo_run_all_unittests',
440         'mojo_service_manager',
441         'mojo_system',
442         'mojo_utility',
443       ],
444       'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
445       'sources': [
446         'service_manager/service_manager_unittest.cc',
447         'service_manager/test.mojom',
448       ],
449     },
450     {
451       'target_name': 'mojo_js_bindings_lib',
452       'type': 'static_library',
453       'dependencies': [
454         '../base/base.gyp:base',
455         '../gin/gin.gyp:gin',
456         '../v8/tools/gyp/v8.gyp:v8',
457         'mojo_common_lib',
458         'mojo_system',
459       ],
460       'export_dependent_settings': [
461         '../base/base.gyp:base',
462         '../gin/gin.gyp:gin',
463         'mojo_common_lib',
464         'mojo_system',
465       ],
466       'sources': [
467         'bindings/js/core.cc',
468         'bindings/js/core.h',
469         'bindings/js/handle.cc',
470         'bindings/js/handle.h',
471         'bindings/js/support.cc',
472         'bindings/js/support.h',
473         'bindings/js/waiting_callback.cc',
474         'bindings/js/waiting_callback.h',
475       ],
476     },
477     {
478       'target_name': 'mojo_js_unittests',
479       'type': 'executable',
480       'dependencies': [
481         '../gin/gin.gyp:gin_test',
482         'mojo_js_bindings_lib',
483         'mojo_run_all_unittests',
484         'mojo_sample_service',
485       ],
486       'sources': [
487         'bindings/js/run_js_tests.cc',
488       ],
489     },
490   ],
491   'conditions': [
492     ['OS=="android"', {
493       'targets': [
494         {
495           'target_name': 'mojo_native_viewport_java',
496           'type': 'none',
497           'dependencies': [
498             '../base/base.gyp:base_java',
499           ],
500           'variables': {
501             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
502           },
503           'includes': [ '../build/java.gypi' ],
504         },
505         {
506           'target_name': 'mojo_java_set_jni_headers',
507           'type': 'none',
508           'variables': {
509             'jni_gen_package': 'mojo',
510             'jni_generator_ptr_type': 'long',
511             'input_java_class': 'java/util/HashSet.class',
512           },
513           'includes': [ '../build/jar_file_jni_generator.gypi' ],
514         },
515         {
516           'target_name': 'mojo_jni_headers',
517           'type': 'none',
518           'dependencies': [
519             'mojo_java_set_jni_headers',
520           ],
521           'sources': [
522             'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java',
523             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
524           ],
525           'variables': {
526             'jni_gen_package': 'mojo',
527             'jni_generator_ptr_type': 'long',
528          },
529           'includes': [ '../build/jni_generator.gypi' ],
530         },
531         {
532           'target_name': 'libmojo_shell',
533           'type': 'shared_library',
534           'dependencies': [
535             '../base/base.gyp:base',
536             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
537             '../ui/gfx/gfx.gyp:gfx',
538             '../ui/gfx/gfx.gyp:gfx_geometry',
539             '../ui/gl/gl.gyp:gl',
540             'mojo_common_lib',
541             'mojo_environment_chromium',
542             'mojo_jni_headers',
543             'mojo_shell_bindings',
544             'mojo_shell_lib',
545           ],
546           'sources': [
547             'shell/android/library_loader.cc',
548             'shell/android/mojo_main.cc',
549             'shell/android/mojo_main.h',
550           ],
551         },
552         {
553           'target_name': 'mojo_shell_apk',
554           'type': 'none',
555           'dependencies': [
556             '../base/base.gyp:base_java',
557             '../net/net.gyp:net_java',
558             'mojo_native_viewport_java',
559             'libmojo_shell',
560           ],
561           'variables': {
562             'apk_name': 'MojoShell',
563             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
564             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
565             'native_lib_target': 'libmojo_shell',
566           },
567           'includes': [ '../build/java_apk.gypi' ],
568         }
569       ],
570     }],
571     ['test_isolation_mode != "noop"', {
572       'targets': [
573         {
574           'target_name': 'mojo_js_unittests_run',
575           'type': 'none',
576           'dependencies': [
577             'mojo_js_unittests',
578           ],
579           'includes': [
580             '../build/isolate.gypi',
581             'mojo_js_unittests.isolate',
582           ],
583           'sources': [
584             'mojo_js_unittests.isolate',
585           ],
586         },
587       ],
588     }],
589   ],