[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob2eebad6c79048461a7adb95208776d07415f8cd5
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     'conditions': [
20       #
21       # The following mojo_system-prefixed variables are used to express a
22       # dependency on the mojo system APIs.
23       #
24       # In a component == "shared_library" build, everything can link against
25       # mojo_system_impl because it is built as a shared library. However, in a
26       # component != "shared_library" build, mojo_system_impl is linked into an
27       # executable (e.g., mojo_shell), and must be injected into other shared
28       # libraries (i.e., Mojo Apps) that need the mojo system API.
29       #
30       # For component targets, add <(mojo_system_for_component) to your
31       # dependencies section.  For loadable module targets (e.g., a Mojo App),
32       # add <(mojo_system_for_loadable_module) to your dependencies section.
33       #
34       # NOTE: component != "shared_library" implies that we are generating a
35       # static library, and in that case, it is expected that the target
36       # listing the component as a dependency will specify either mojo_system
37       # or mojo_system_impl to link against. This enables multiple targets to
38       # link against the same component library without having to agree on
39       # which Mojo system library they are using.
40       #
41       ['component=="shared_library"', {
42         'mojo_system_for_component': "mojo_system_impl",
43         'mojo_system_for_loadable_module': "mojo_system_impl",
44       }, {
45         'mojo_system_for_component': "mojo_none",
46         'mojo_system_for_loadable_module': "mojo_system",
47       }],
48     ],
49   },
50   'includes': [
51     'mojo_apps.gypi',
52     'mojo_examples.gypi',
53     'mojo_public.gypi',
54     'mojo_public_tests.gypi',
55     'mojo_services.gypi',
56   ],
57   'targets': [
58     {
59       'target_name': 'mojo',
60       'type': 'none',
61       'dependencies': [
62         'mojo_apps_js_unittests',
63         'mojo_compositor_app',
64         'mojo_common_lib',
65         'mojo_common_unittests',
66         'mojo_cpp_bindings',
67         'mojo_geometry_lib',
68         'mojo_html_viewer',
69         'mojo_js',
70         'mojo_js_bindings',
71         'mojo_js_unittests',
72         'mojo_launcher',
73         'mojo_message_generator',
74         'mojo_native_viewport_service',
75         'mojo_network_service',
76         'mojo_pepper_container_app',
77         'mojo_png_viewer',
78         'mojo_public_application_unittests',
79         'mojo_public_test_utils',
80         'mojo_public_bindings_unittests',
81         'mojo_public_environment_unittests',
82         'mojo_public_system_perftests',
83         'mojo_public_system_unittests',
84         'mojo_public_utility_unittests',
85         'mojo_sample_app',
86         'mojo_service_manager',
87         'mojo_service_manager_unittests',
88         'mojo_shell',
89         'mojo_shell_lib',
90         'mojo_shell_tests',
91         'mojo_surfaces_app',
92         'mojo_surfaces_child_app',
93         'mojo_surfaces_lib',
94         'mojo_surfaces_lib_unittests',
95         'mojo_surfaces_app',
96         'mojo_surfaces_service',
97         'mojo_system',
98         'mojo_system_impl',
99         'mojo_system_unittests',
100         'mojo_test_app',
101         'mojo_test_request_tracker_app',
102         'mojo_utility',
103         'mojo_view_manager_lib',
104         'mojo_view_manager_lib_unittests',
105         'mojo_wget',
106       ],
107       'conditions': [
108         ['use_aura==1', {
109           'dependencies': [
110             'mojo_aura_demo',
111             'mojo_aura_demo_init',
112             'mojo_browser',
113             'mojo_demo_launcher',
114             'mojo_embedded_app',
115             'mojo_keyboard',
116             'mojo_media_viewer',
117             'mojo_nesting_app',
118             'mojo_window_manager',
119             'mojo_view_manager',
120             'mojo_view_manager_unittests',
121           ],
122         }],
123         ['OS == "android"', {
124           'dependencies': [
125             'mojo_bindings_java',
126             'mojo_public_java',
127             'mojo_system_java',
128             'libmojo_system_java',
129             'mojo_test_apk',
130           ],
131         }],
132         ['OS == "linux"', {
133           'dependencies': [
134             'mojo_dbus_echo',
135             'mojo_dbus_echo_service',
136           ],
137         }],
138       ]
139     },
140     {
141       'target_name': 'mojo_none',
142       'type': 'none',
143     },
144     {
145       'target_name': 'mojo_external_service_bindings',
146       'type': 'static_library',
147       'sources': [
148         'shell/external_service.mojom',
149       ],
150       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
151       'export_dependent_settings': [
152         'mojo_cpp_bindings',
153       ],
154       'dependencies': [
155         'mojo_cpp_bindings',
156       ],
157     },
158     {
159       'target_name': 'mojo_run_all_unittests',
160       'type': 'static_library',
161       'dependencies': [
162         '../base/base.gyp:base',
163         '../base/base.gyp:test_support_base',
164         '../testing/gtest.gyp:gtest',
165         'mojo_system_impl',
166         'mojo_test_support',
167         'mojo_test_support_impl',
168       ],
169       'sources': [
170         'common/test/run_all_unittests.cc',
171       ],
172     },
173     {
174       'target_name': 'mojo_run_all_perftests',
175       'type': 'static_library',
176       'dependencies': [
177         '../base/base.gyp:test_support_base',
178         'mojo_system_impl',
179         'mojo_test_support',
180         'mojo_test_support_impl',
181       ],
182       'sources': [
183         'common/test/run_all_perftests.cc',
184       ],
185     },
186     {
187       # GN version: //mojo/system
188       'target_name': 'mojo_system_impl',
189       'type': '<(component)',
190       'dependencies': [
191         '../base/base.gyp:base',
192         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
193       ],
194       'defines': [
195         'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
196         'MOJO_SYSTEM_IMPLEMENTATION',
197         'MOJO_USE_SYSTEM_IMPL',
198       ],
199       'sources': [
200         'embedder/channel_init.cc',
201         'embedder/channel_init.h',
202         'embedder/embedder.cc',
203         'embedder/embedder.h',
204         'embedder/platform_channel_pair.cc',
205         'embedder/platform_channel_pair.h',
206         'embedder/platform_channel_pair_posix.cc',
207         'embedder/platform_channel_pair_win.cc',
208         'embedder/platform_channel_utils_posix.cc',
209         'embedder/platform_channel_utils_posix.h',
210         'embedder/platform_handle.cc',
211         'embedder/platform_handle.h',
212         'embedder/platform_handle_utils.h',
213         'embedder/platform_handle_utils_posix.cc',
214         'embedder/platform_handle_utils_win.cc',
215         'embedder/platform_handle_vector.h',
216         'embedder/scoped_platform_handle.h',
217         'system/channel.cc',
218         'system/channel.h',
219         'system/constants.h',
220         'system/core.cc',
221         'system/core.h',
222         'system/data_pipe.cc',
223         'system/data_pipe.h',
224         'system/data_pipe_consumer_dispatcher.cc',
225         'system/data_pipe_consumer_dispatcher.h',
226         'system/data_pipe_producer_dispatcher.cc',
227         'system/data_pipe_producer_dispatcher.h',
228         'system/dispatcher.cc',
229         'system/dispatcher.h',
230         'system/entrypoints.cc',
231         'system/handle_signals_state.h',
232         'system/handle_table.cc',
233         'system/handle_table.h',
234         'system/local_data_pipe.cc',
235         'system/local_data_pipe.h',
236         'system/local_message_pipe_endpoint.cc',
237         'system/local_message_pipe_endpoint.h',
238         'system/mapping_table.cc',
239         'system/mapping_table.h',
240         'system/memory.cc',
241         'system/memory.h',
242         'system/message_in_transit.cc',
243         'system/message_in_transit.h',
244         'system/message_in_transit_queue.cc',
245         'system/message_in_transit_queue.h',
246         'system/message_pipe.cc',
247         'system/message_pipe.h',
248         'system/message_pipe_dispatcher.cc',
249         'system/message_pipe_dispatcher.h',
250         'system/message_pipe_endpoint.cc',
251         'system/message_pipe_endpoint.h',
252         'system/options_validation.h',
253         'system/platform_handle_dispatcher.cc',
254         'system/platform_handle_dispatcher.h',
255         'system/proxy_message_pipe_endpoint.cc',
256         'system/proxy_message_pipe_endpoint.h',
257         'system/raw_channel.cc',
258         'system/raw_channel.h',
259         'system/raw_channel_posix.cc',
260         'system/raw_channel_win.cc',
261         'system/raw_shared_buffer.cc',
262         'system/raw_shared_buffer.h',
263         'system/raw_shared_buffer_posix.cc',
264         'system/raw_shared_buffer_win.cc',
265         'system/shared_buffer_dispatcher.cc',
266         'system/shared_buffer_dispatcher.h',
267         'system/simple_dispatcher.cc',
268         'system/simple_dispatcher.h',
269         'system/transport_data.cc',
270         'system/transport_data.h',
271         'system/waiter.cc',
272         'system/waiter.h',
273         'system/waiter_list.cc',
274         'system/waiter_list.h',
275         # Test-only code:
276         # TODO(vtl): It's a little unfortunate that these end up in the same
277         # component as non-test-only code. In the static build, this code should
278         # hopefully be dead-stripped.
279         'embedder/test_embedder.cc',
280         'embedder/test_embedder.h',
281       ],
282       'all_dependent_settings': {
283         # Ensures that dependent projects import the core functions on Windows.
284         'defines': ['MOJO_USE_SYSTEM_IMPL'],
285       }
286     },
287     {
288       'target_name': 'mojo_system_unittests',
289       'type': 'executable',
290       'dependencies': [
291         '../base/base.gyp:base',
292         '../base/base.gyp:run_all_unittests',
293         '../testing/gtest.gyp:gtest',
294         'mojo_common_test_support',
295         'mojo_system_impl',
296       ],
297       'sources': [
298         'embedder/embedder_unittest.cc',
299         'embedder/platform_channel_pair_posix_unittest.cc',
300         'system/channel_unittest.cc',
301         'system/core_unittest.cc',
302         'system/core_test_base.cc',
303         'system/core_test_base.h',
304         'system/data_pipe_unittest.cc',
305         'system/dispatcher_unittest.cc',
306         'system/local_data_pipe_unittest.cc',
307         'system/memory_unittest.cc',
308         'system/message_pipe_dispatcher_unittest.cc',
309         'system/message_pipe_unittest.cc',
310         'system/multiprocess_message_pipe_unittest.cc',
311         'system/options_validation_unittest.cc',
312         'system/platform_handle_dispatcher_unittest.cc',
313         'system/raw_channel_unittest.cc',
314         'system/raw_shared_buffer_unittest.cc',
315         'system/remote_message_pipe_unittest.cc',
316         'system/shared_buffer_dispatcher_unittest.cc',
317         'system/simple_dispatcher_unittest.cc',
318         'system/test_utils.cc',
319         'system/test_utils.h',
320         'system/waiter_list_unittest.cc',
321         'system/waiter_test_utils.cc',
322         'system/waiter_test_utils.h',
323         'system/waiter_unittest.cc',
324       ],
325     },
326     {
327       'target_name': 'mojo_gles2_impl',
328       'type': '<(component)',
329       'dependencies': [
330         '../base/base.gyp:base',
331         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
332         '../gpu/gpu.gyp:command_buffer_client',
333         '../gpu/gpu.gyp:command_buffer_common',
334         '../gpu/gpu.gyp:gles2_cmd_helper',
335         '../gpu/gpu.gyp:gles2_implementation',
336         'mojo_gles2',
337         'mojo_gles2_bindings',
338         'mojo_environment_chromium',
339         '<(mojo_system_for_component)',
340       ],
341       'defines': [
342         'MOJO_GLES2_IMPL_IMPLEMENTATION',
343       ],
344       'sources': [
345         'gles2/command_buffer_client_impl.cc',
346         'gles2/command_buffer_client_impl.h',
347         'gles2/gles2_impl_export.h',
348         'gles2/gles2_support_impl.cc',
349         'gles2/gles2_support_impl.h',
350         'gles2/gles2_context.cc',
351         'gles2/gles2_context.h',
352       ],
353     },
354     {
355       'target_name': 'mojo_test_support_impl',
356       'type': 'static_library',
357       'dependencies': [
358         '../base/base.gyp:base',
359       ],
360       'sources': [
361         'common/test/test_support_impl.cc',
362         'common/test/test_support_impl.h',
363       ],
364     },
365     {
366       # GN version: //mojo/common
367       'target_name': 'mojo_common_lib',
368       'type': '<(component)',
369       'defines': [
370         'MOJO_COMMON_IMPLEMENTATION',
371       ],
372       'dependencies': [
373         '../base/base.gyp:base',
374         '../url/url.gyp:url_lib',
375         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
376         '<(mojo_system_for_component)',
377       ],
378       'export_dependent_settings': [
379         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
380       ],
381       'sources': [
382         'common/common_type_converters.cc',
383         'common/common_type_converters.h',
384         'common/data_pipe_utils.cc',
385         'common/data_pipe_utils.h',
386         'common/handle_watcher.cc',
387         'common/handle_watcher.h',
388         'common/message_pump_mojo.cc',
389         'common/message_pump_mojo.h',
390         'common/message_pump_mojo_handler.h',
391         'common/time_helper.cc',
392         'common/time_helper.h',
393       ],
394     },
395     {
396       'target_name': 'mojo_common_test_support',
397       'type': 'static_library',
398       'dependencies': [
399         '../base/base.gyp:base',
400         '../base/base.gyp:test_support_base',
401         '../testing/gtest.gyp:gtest',
402         'mojo_system_impl',
403       ],
404       'sources': [
405         'common/test/multiprocess_test_helper.cc',
406         'common/test/multiprocess_test_helper.h',
407         'common/test/test_utils.h',
408         'common/test/test_utils_posix.cc',
409         'common/test/test_utils_win.cc',
410       ],
411     },
412     {
413       'target_name': 'mojo_common_unittests',
414       'type': 'executable',
415       'dependencies': [
416         '../base/base.gyp:base',
417         '../base/base.gyp:base_message_loop_tests',
418         '../testing/gtest.gyp:gtest',
419         '../url/url.gyp:url_lib',
420         'mojo_cpp_bindings',
421         'mojo_environment_chromium',
422         'mojo_common_lib',
423         'mojo_common_test_support',
424         'mojo_public_test_utils',
425         'mojo_run_all_unittests',
426       ],
427       'sources': [
428         'common/common_type_converters_unittest.cc',
429         'common/handle_watcher_unittest.cc',
430         'common/message_pump_mojo_unittest.cc',
431         'common/test/multiprocess_test_helper_unittest.cc',
432       ],
433     },
434     {
435       # GN version: //mojo/environment:chromium
436       'target_name': 'mojo_environment_chromium',
437       'type': 'static_library',
438       'dependencies': [
439         'mojo_environment_chromium_impl',
440       ],
441       'sources': [
442         'environment/environment.cc',
443         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
444         "public/cpp/environment/logging.h",
445         "public/cpp/environment/lib/logging.cc",
446       ],
447       'include_dirs': [
448         '..',
449       ],
450       'export_dependent_settings': [
451         'mojo_environment_chromium_impl',
452       ],
453     },
454     {
455       # GN version: //mojo/environment:chromium_impl
456       'target_name': 'mojo_environment_chromium_impl',
457       'type': '<(component)',
458       'defines': [
459         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
460       ],
461       'dependencies': [
462         '../base/base.gyp:base',
463         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
464         'mojo_common_lib',
465         '<(mojo_system_for_component)',
466       ],
467       'sources': [
468         'environment/default_async_waiter_impl.cc',
469         'environment/default_async_waiter_impl.h',
470         'environment/default_logger_impl.cc',
471         'environment/default_logger_impl.h',
472       ],
473       'include_dirs': [
474         '..',
475       ],
476     },
477     {
478       # GN version: //mojo/service_manager
479       'target_name': 'mojo_service_manager',
480       'type': '<(component)',
481       'defines': [
482         'MOJO_SERVICE_MANAGER_IMPLEMENTATION',
483       ],
484       'dependencies': [
485         '../base/base.gyp:base',
486         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
487         '../net/net.gyp:net',
488         '../url/url.gyp:url_lib',
489         'mojo_common_lib',
490         'mojo_environment_chromium',
491         'mojo_service_provider_bindings',
492         '<(mojo_system_for_component)',
493       ],
494       'sources': [
495         'service_manager/background_service_loader.cc',
496         'service_manager/background_service_loader.h',
497         'service_manager/service_loader.h',
498         'service_manager/service_manager.cc',
499         'service_manager/service_manager.h',
500         'service_manager/service_manager_export.h',
501       ],
502       'export_dependent_settings': [
503         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
504         'mojo_service_provider_bindings',
505       ],
506     },
507     {
508       'target_name': 'mojo_spy',
509       'type': 'static_library',
510       'dependencies': [
511         '../base/base.gyp:base',
512         '../base/base.gyp:base_static',
513         '../net/net.gyp:http_server',
514         '../url/url.gyp:url_lib',
515         'mojo_service_manager',
516       ],
517       'variables': {
518         'mojom_base_output_dir': 'mojo',
519       },
520       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
521       'sources': [
522         'spy/public/spy.mojom',
523         'spy/common.h',
524         'spy/spy.cc',
525         'spy/spy.h',
526         'spy/spy_server_impl.h',
527         'spy/spy_server_impl.cc',
528         'spy/websocket_server.cc',
529         'spy/websocket_server.h',
530       ],
531     },
532     {
533       'target_name': 'mojo_shell_lib',
534       'type': 'static_library',
535       'dependencies': [
536         '../base/base.gyp:base',
537         '../base/base.gyp:base_static',
538         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
539         '../net/net.gyp:net',
540         '../url/url.gyp:url_lib',
541         'mojo_application',
542         'mojo_common_lib',
543         'mojo_external_service_bindings',
544         'mojo_gles2_impl',
545         'mojo_native_viewport_service',
546         'mojo_network_bindings',
547         'mojo_service_manager',
548         'mojo_service_provider_bindings',
549         'mojo_spy',
550         'mojo_system_impl',
551       ],
552       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
553       'sources': [
554         'shell/app_child_process.cc',
555         'shell/app_child_process.h',
556         'shell/app_child_process.mojom',
557         'shell/app_child_process_host.cc',
558         'shell/app_child_process_host.h',
559         'shell/child_process.cc',
560         'shell/child_process.h',
561         'shell/child_process_host.cc',
562         'shell/child_process_host.h',
563         'shell/context.cc',
564         'shell/context.h',
565         'shell/dbus_service_loader_linux.cc',
566         'shell/dbus_service_loader_linux.h',
567         'shell/dynamic_service_loader.cc',
568         'shell/dynamic_service_loader.h',
569         'shell/dynamic_service_runner.h',
570         'shell/init.cc',
571         'shell/init.h',
572         'shell/in_process_dynamic_service_runner.cc',
573         'shell/in_process_dynamic_service_runner.h',
574         'shell/keep_alive.cc',
575         'shell/keep_alive.h',
576         'shell/mojo_url_resolver.cc',
577         'shell/mojo_url_resolver.h',
578         'shell/out_of_process_dynamic_service_runner.cc',
579         'shell/out_of_process_dynamic_service_runner.h',
580         'shell/run.cc',
581         'shell/run.h',
582         'shell/switches.cc',
583         'shell/switches.h',
584         'shell/task_runners.cc',
585         'shell/task_runners.h',
586         'shell/test_child_process.cc',
587         'shell/test_child_process.h',
588         'shell/view_manager_loader.cc',
589         'shell/view_manager_loader.h',
590       ],
591       'conditions': [
592         ['OS=="linux"', {
593           'dependencies': [
594             '../build/linux/system.gyp:dbus',
595             '../dbus/dbus.gyp:dbus',
596           ],
597         }],
598         ['OS=="android"', {
599           'dependencies': [
600             'mojo_network_service_lib',
601           ],
602           'sources': [
603             'shell/network_service_loader.cc',
604             'shell/network_service_loader.h',
605           ],
606         }],
607         ['use_aura==1', {
608           'dependencies': [
609             # These are only necessary as long as we hard code use of ViewManager.
610             '../skia/skia.gyp:skia',
611             'mojo_gles2',
612             'mojo_view_manager',
613             'mojo_view_manager_bindings',
614           ],
615         }, {  # use_aura==0
616           'sources!': [
617             'shell/view_manager_loader.cc',
618             'shell/view_manager_loader.h',
619           ],
620         }],
621       ],
622     },
623     {
624       'target_name': 'mojo_shell_test_support',
625       'type': 'static_library',
626       'dependencies': [
627         '../base/base.gyp:base',
628         '../base/base.gyp:base_static',
629         '../url/url.gyp:url_lib',
630         'mojo_service_manager',
631         'mojo_shell_lib',
632         'mojo_system_impl',
633       ],
634       'sources': [
635         'shell/shell_test_helper.cc',
636         'shell/shell_test_helper.h',
637       ],
638     },
639     {
640       'target_name': 'mojo_shell',
641       'type': 'executable',
642       'dependencies': [
643         '../base/base.gyp:base',
644         '../ui/gl/gl.gyp:gl',
645         '../url/url.gyp:url_lib',
646         'mojo_common_lib',
647         'mojo_environment_chromium',
648         'mojo_service_manager',
649         'mojo_shell_lib',
650         'mojo_system_impl',
651       ],
652       'conditions': [
653         ['use_ozone==1', {
654           'dependencies': [
655             '../ui/ozone/ozone.gyp:ozone',
656           ],
657         }],
658       ],
659       'sources': [
660         'shell/desktop/mojo_main.cc',
661       ],
662     },
663     {
664       'target_name': 'mojo_shell_tests',
665       'type': '<(gtest_target_type)',
666       'dependencies': [
667         '../base/base.gyp:base',
668         '../base/base.gyp:base_i18n',
669         '../base/base.gyp:test_support_base',
670         '../testing/gtest.gyp:gtest',
671         # TODO(vtl): We don't currently need this, but I imagine we will soon.
672         # '../ui/gl/gl.gyp:gl',
673         '../url/url.gyp:url_lib',
674         'mojo_common_lib',
675         'mojo_environment_chromium',
676         'mojo_service_manager',
677         'mojo_shell_lib',
678         'mojo_system_impl',
679         'mojo_test_app',
680         'mojo_test_request_tracker_app',
681         'mojo_test_service_bindings',
682       ],
683       'sources': [
684         'shell/child_process_host_unittest.cc',
685         'shell/shell_test_base.cc',
686         'shell/shell_test_base.h',
687         'shell/shell_test_base_unittest.cc',
688         'shell/shell_test_main.cc',
689       ],
690       'conditions': [
691         ['OS == "android"', {
692           'dependencies': [
693             '../testing/android/native_test.gyp:native_test_native_code',
694           ],
695         }],
696       ],
697     },
698     {
699       'target_name': 'mojo_service_manager_unittests',
700       'type': 'executable',
701       'dependencies': [
702         '../base/base.gyp:base',
703         '../testing/gtest.gyp:gtest',
704         '../url/url.gyp:url_lib',
705         'mojo_common_lib',
706         'mojo_cpp_bindings',
707         'mojo_environment_chromium',
708         'mojo_run_all_unittests',
709         'mojo_service_manager',
710         'mojo_application',
711       ],
712       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
713       'sources': [
714         'service_manager/service_manager_unittest.cc',
715         'service_manager/test.mojom',
716       ],
717     },
718     {
719       'target_name': 'mojo_js_bindings_lib',
720       'type': 'static_library',
721       'dependencies': [
722         '../base/base.gyp:base',
723         '../gin/gin.gyp:gin',
724         '../v8/tools/gyp/v8.gyp:v8',
725         'mojo_common_lib',
726       ],
727       'export_dependent_settings': [
728         '../base/base.gyp:base',
729         '../gin/gin.gyp:gin',
730         'mojo_common_lib',
731       ],
732       'sources': [
733         'bindings/js/core.cc',
734         'bindings/js/core.h',
735         'bindings/js/handle.cc',
736         'bindings/js/handle.h',
737         'bindings/js/support.cc',
738         'bindings/js/support.h',
739         'bindings/js/waiting_callback.cc',
740         'bindings/js/waiting_callback.h',
741       ],
742     },
743     {
744       'target_name': 'mojo_js_unittests',
745       'type': 'executable',
746       'dependencies': [
747         '../gin/gin.gyp:gin_test',
748         'mojo_common_test_support',
749         'mojo_js_bindings_lib',
750         'mojo_run_all_unittests',
751         'mojo_public_test_interfaces',
752       ],
753       'sources': [
754         'bindings/js/run_js_tests.cc',
755       ],
756     },
757     {
758       'target_name': 'mojo_message_generator',
759       'type': 'executable',
760       'dependencies': [
761         '../base/base.gyp:base',
762         '../testing/gtest.gyp:gtest',
763         'mojo_common_lib',
764         'mojo_cpp_bindings',
765         'mojo_environment_chromium',
766         'mojo_system_impl',
767       ],
768       'sources': [
769         'tools/message_generator.cc',
770       ],
771     },
772     {
773       'target_name': 'mojo_cc_support',
774       'type': 'static_library',
775       'dependencies': [
776         '../base/base.gyp:base',
777         '../cc/cc.gyp:cc',
778         '../skia/skia.gyp:skia',
779         '../gpu/gpu.gyp:gles2_implementation',
780         'mojo_gles2',
781       ],
782       'sources': [
783         'cc/context_provider_mojo.cc',
784         'cc/context_provider_mojo.h',
785       ],
786     },
787   ],
788   'conditions': [
789     ['OS=="android"', {
790       'targets': [
791         {
792           'target_name': 'mojo_jni_headers',
793           'type': 'none',
794           'dependencies': [
795             'mojo_java_set_jni_headers',
796           ],
797           'sources': [
798             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
799             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
800             'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java',
801             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
802           ],
803           'variables': {
804             'jni_gen_package': 'mojo',
805          },
806           'includes': [ '../build/jni_generator.gypi' ],
807         },
808         {
809           'target_name': 'mojo_system_java',
810           'type': 'none',
811           'dependencies': [
812             '../base/base.gyp:base_java',
813             'mojo_public_java',
814           ],
815           'variables': {
816             'java_in_dir': '<(DEPTH)/mojo/android/system',
817           },
818           'includes': [ '../build/java.gypi' ],
819         },
820         {
821           'target_name': 'libmojo_system_java',
822           'type': 'static_library',
823           'dependencies': [
824             '../base/base.gyp:base',
825             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
826             'mojo_common_lib',
827             'mojo_environment_chromium',
828             'mojo_jni_headers',
829             'mojo_service_provider_bindings',
830             'mojo_shell_lib',
831           ],
832           'sources': [
833             'android/system/core_impl.cc',
834             'android/system/core_impl.h',
835           ],
836         },
837         {
838           'target_name': 'libmojo_java_unittest',
839           'type': 'shared_library',
840           'dependencies': [
841             '../base/base.gyp:base',
842             '../base/base.gyp:test_support_base',
843             'libmojo_system_java',
844             'mojo_jni_headers',
845           ],
846           'defines': [
847             'UNIT_TEST'  # As exported from testing/gtest.gyp:gtest.
848           ],
849           'sources': [
850             'android/javatests/mojo_test_case.cc',
851             'android/javatests/mojo_test_case.h',
852             'android/javatests/init_library.cc',
853           ],
854         },
855         {
856           'target_name': 'mojo_test_apk',
857           'type': 'none',
858           'dependencies': [
859             'mojo_bindings_java',
860             'mojo_public_test_interfaces',
861             'mojo_system_java',
862             '../base/base.gyp:base_java_test_support',
863           ],
864           'variables': {
865             'apk_name': 'MojoTest',
866             'java_in_dir': '<(DEPTH)/mojo/android/javatests',
867             'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
868             'native_lib_target': 'libmojo_java_unittest',
869             'is_test_apk': 1,
870             # Given that this apk tests itself, it needs to bring emma with it
871             # when instrumented.
872             'conditions': [
873               ['emma_coverage != 0', {
874                 'emma_instrument': 1,
875               }],
876             ],
877           },
878           'includes': [ '../build/java_apk.gypi' ],
879         },
880         {
881           'target_name': 'mojo_native_viewport_java',
882           'type': 'none',
883           'dependencies': [
884             '../base/base.gyp:base_java',
885           ],
886           'variables': {
887             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
888           },
889           'includes': [ '../build/java.gypi' ],
890         },
891         {
892           'target_name': 'mojo_java_set_jni_headers',
893           'type': 'none',
894           'variables': {
895             'jni_gen_package': 'mojo',
896             'input_java_class': 'java/util/HashSet.class',
897           },
898           'includes': [ '../build/jar_file_jni_generator.gypi' ],
899         },
900         {
901           'target_name': 'libmojo_shell',
902           'type': 'shared_library',
903           'dependencies': [
904             '../base/base.gyp:base',
905             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
906             '../ui/gfx/gfx.gyp:gfx',
907             '../ui/gfx/gfx.gyp:gfx_geometry',
908             '../ui/gl/gl.gyp:gl',
909             'mojo_common_lib',
910             'mojo_environment_chromium',
911             'mojo_jni_headers',
912             'mojo_service_provider_bindings',
913             'mojo_shell_lib',
914           ],
915           'sources': [
916             'shell/android/library_loader.cc',
917             'shell/android/mojo_main.cc',
918             'shell/android/mojo_main.h',
919           ],
920         },
921         {
922           'target_name': 'mojo_shell_apk',
923           'type': 'none',
924           'dependencies': [
925             '../base/base.gyp:base_java',
926             '../net/net.gyp:net_java',
927             'mojo_native_viewport_java',
928             'libmojo_shell',
929           ],
930           'variables': {
931             'apk_name': 'MojoShell',
932             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
933             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
934             'native_lib_target': 'libmojo_shell',
935           },
936           'includes': [ '../build/java_apk.gypi' ],
937         }
938       ],
939     }],
940     ['OS=="linux"', {
941       'targets': [
942         {
943           'target_name': 'mojo_dbus_service',
944           'type': 'static_library',
945           'dependencies': [
946             '../base/base.gyp:base',
947             '../build/linux/system.gyp:dbus',
948             '../dbus/dbus.gyp:dbus',
949             'mojo_common_lib',
950             'mojo_external_service_bindings',
951             'mojo_application',
952             'mojo_system_impl',
953           ],
954           'sources': [
955             'dbus/dbus_external_service.h',
956             'dbus/dbus_external_service.cc',
957           ],
958         },
959       ],
960     }],
961     ['test_isolation_mode != "noop"', {
962       'targets': [
963         {
964           'target_name': 'mojo_js_unittests_run',
965           'type': 'none',
966           'dependencies': [
967             'mojo_js_unittests',
968           ],
969           'includes': [
970             '../build/isolate.gypi',
971             'mojo_js_unittests.isolate',
972           ],
973           'sources': [
974             'mojo_js_unittests.isolate',
975           ],
976         },
977       ],
978     }],
979     ['use_aura==1', {
980       'targets': [
981         {
982           'target_name': 'mojo_aura_support',
983           'type': 'static_library',
984           'dependencies': [
985             '../cc/cc.gyp:cc',
986             '../ui/aura/aura.gyp:aura',
987             '../ui/compositor/compositor.gyp:compositor',
988             '../ui/events/events.gyp:events',
989             '../ui/events/events.gyp:events_base',
990             '../ui/gl/gl.gyp:gl',
991             '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
992             'mojo_cc_support',
993             'mojo_gles2',
994             'mojo_native_viewport_bindings',
995           ],
996           'sources': [
997             'aura/aura_init.cc',
998             'aura/aura_init.h',
999             'aura/context_factory_mojo.cc',
1000             'aura/context_factory_mojo.h',
1001             'aura/screen_mojo.cc',
1002             'aura/screen_mojo.h',
1003             'aura/window_tree_host_mojo.cc',
1004             'aura/window_tree_host_mojo.h',
1005             'aura/window_tree_host_mojo_delegate.h',
1006           ],
1007         },
1008         {
1009           'target_name': 'mojo_views_support',
1010           'type': 'static_library',
1011           'dependencies': [
1012             '../base/base.gyp:base',
1013             '../base/base.gyp:base_i18n',
1014             '../skia/skia.gyp:skia',
1015             '../skia/skia.gyp:skia',
1016             '../third_party/icu/icu.gyp:icui18n',
1017             '../third_party/icu/icu.gyp:icuuc',
1018             '../ui/aura/aura.gyp:aura',
1019             '../ui/base/ui_base.gyp:ui_base',
1020             '../ui/views/views.gyp:views',
1021             '../ui/wm/wm.gyp:wm',
1022             'mojo_aura_support',
1023             'mojo_views_support_internal',
1024           ],
1025           'sources': [
1026             'views/native_widget_view_manager.cc',
1027             'views/native_widget_view_manager.h',
1028             'views/views_init.cc',
1029             'views/views_init.h',
1030           ],
1031         },
1032         {
1033           'target_name': 'mojo_views_support_internal',
1034           'type': '<(component)',
1035           'dependencies': [
1036             '../base/base.gyp:base',
1037             '../base/base.gyp:base_i18n',
1038             '../base/base.gyp:base_static',
1039             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1040             '../skia/skia.gyp:skia',
1041             '../skia/skia.gyp:skia',
1042             '../third_party/icu/icu.gyp:icui18n',
1043             '../third_party/icu/icu.gyp:icuuc',
1044             '../ui/base/ui_base.gyp:ui_base',
1045             '../ui/gfx/gfx.gyp:gfx',
1046           ],
1047           'sources': [
1048             'views/mojo_views_export.h',
1049             'views/views_init_internal.cc',
1050             'views/views_init_internal.h',
1051           ],
1052           'defines': [
1053             'MOJO_VIEWS_IMPLEMENTATION',
1054           ],
1055         },
1056       ],
1057     }],
1058   ],