[GCM] Persistence of account mappings.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob89ddc27b9724d49563877b18f566b06c4793fbe6
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   'includes': [
17     'mojo_apps.gypi',
18     'mojo_examples.gypi',
19     'mojo_services.gypi',
20     'mojo_variables.gypi',
21   ],
22   'targets': [
23     {
24       'target_name': 'mojo',
25       'type': 'none',
26       'dependencies': [
27         'mojo_base.gyp:mojo_base',
28         'mojo_apps_js_unittests',
29         'mojo_compositor_app',
30         'mojo_echo_client',
31         'mojo_echo_service',
32         'mojo_geometry_lib',
33         'mojo_html_viewer',
34         'mojo_js',
35         'mojo_launcher',
36         'mojo_native_viewport_service',
37         'mojo_network_service',
38         'mojo_pepper_container_app',
39         'mojo_png_viewer',
40         'mojo_sample_app',
41         'mojo_service_manager',
42         'mojo_service_manager_unittests',
43         'mojo_shell',
44         'mojo_shell_lib',
45         'mojo_shell_tests',
46         'mojo_surfaces_app',
47         'mojo_surfaces_child_app',
48         'mojo_surfaces_lib',
49         'mojo_surfaces_lib_unittests',
50         'mojo_surfaces_app',
51         'mojo_surfaces_service',
52         'mojo_test_app',
53         'mojo_test_request_tracker_app',
54         'mojo_view_manager_lib',
55         'mojo_view_manager_lib_unittests',
56         'mojo_wget',
57       ],
58       'conditions': [
59         ['use_aura==1', {
60           'dependencies': [
61             'mojo_aura_demo',
62             'mojo_aura_demo_init',
63             'mojo_browser',
64             'mojo_core_window_manager',
65             'mojo_core_window_manager_unittests',
66             'mojo_demo_launcher',
67             'mojo_embedded_app',
68             'mojo_keyboard',
69             'mojo_media_viewer',
70             'mojo_nesting_app',
71             'mojo_window_manager',
72             'mojo_wm_flow_app',
73             'mojo_wm_flow_init',
74             'mojo_wm_flow_wm',
75             'mojo_view_manager',
76             'mojo_view_manager_unittests',
77           ],
78         }],
79         ['OS == "linux"', {
80           'dependencies': [
81             'mojo_dbus_echo',
82             'mojo_dbus_echo_service',
83           ],
84         }],
85       ]
86     },
87     {
88       # GN version: //mojo/shell:external_service_bindings
89       'target_name': 'mojo_external_service_bindings',
90       'type': 'static_library',
91       'sources': [
92         'shell/external_service.mojom',
93       ],
94       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
95       'export_dependent_settings': [
96         'mojo_base.gyp:mojo_cpp_bindings',
97       ],
98       'dependencies': [
99         'mojo_base.gyp:mojo_cpp_bindings',
100       ],
101     },
102     {
103       # GN version: //mojo/gles2
104       'target_name': 'mojo_gles2_impl',
105       'type': '<(component)',
106       'dependencies': [
107         '../base/base.gyp:base',
108         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
109         '../gpu/gpu.gyp:command_buffer_client',
110         '../gpu/gpu.gyp:command_buffer_common',
111         '../gpu/gpu.gyp:gles2_cmd_helper',
112         '../gpu/gpu.gyp:gles2_implementation',
113         'mojo_base.gyp:mojo_environment_chromium',
114         'mojo_gles2',
115         'mojo_gles2_bindings',
116         '<(mojo_system_for_component)',
117       ],
118       'defines': [
119         'MOJO_GLES2_IMPL_IMPLEMENTATION',
120       ],
121       'sources': [
122         'gles2/command_buffer_client_impl.cc',
123         'gles2/command_buffer_client_impl.h',
124         'gles2/gles2_impl_export.h',
125         'gles2/gles2_support_impl.cc',
126         'gles2/gles2_support_impl.h',
127         'gles2/gles2_context.cc',
128         'gles2/gles2_context.h',
129       ],
130     },
131     {
132       'target_name': 'mojo_spy',
133       'type': 'static_library',
134       'dependencies': [
135         '../base/base.gyp:base',
136         '../base/base.gyp:base_static',
137         '../net/net.gyp:http_server',
138         '../url/url.gyp:url_lib',
139         'mojo_service_manager',
140       ],
141       'variables': {
142         'mojom_base_output_dir': 'mojo',
143       },
144       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
145       'sources': [
146         'spy/public/spy.mojom',
147         'spy/common.h',
148         'spy/spy.cc',
149         'spy/spy.h',
150         'spy/spy_server_impl.h',
151         'spy/spy_server_impl.cc',
152         'spy/websocket_server.cc',
153         'spy/websocket_server.h',
154       ],
155     },
156     {
157       # GN version: //mojo/shell:lib
158       'target_name': 'mojo_shell_lib',
159       'type': 'static_library',
160       'dependencies': [
161         '../base/base.gyp:base',
162         '../base/base.gyp:base_static',
163         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
164         '../net/net.gyp:net',
165         '../url/url.gyp:url_lib',
166         'mojo_base.gyp:mojo_application_bindings',
167         'mojo_base.gyp:mojo_common_lib',
168         'mojo_base.gyp:mojo_system_impl',
169         'mojo_base.gyp:mojo_application',
170         'mojo_external_service_bindings',
171         'mojo_gles2_impl',
172         'mojo_native_viewport_service',
173         'mojo_network_bindings',
174         'mojo_service_manager',
175         'mojo_spy',
176       ],
177       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
178       'sources': [
179         'shell/app_child_process.cc',
180         'shell/app_child_process.h',
181         'shell/app_child_process.mojom',
182         'shell/app_child_process_host.cc',
183         'shell/app_child_process_host.h',
184         'shell/child_process.cc',
185         'shell/child_process.h',
186         'shell/child_process_host.cc',
187         'shell/child_process_host.h',
188         'shell/context.cc',
189         'shell/context.h',
190         'shell/dbus_service_loader_linux.cc',
191         'shell/dbus_service_loader_linux.h',
192         'shell/dynamic_service_loader.cc',
193         'shell/dynamic_service_loader.h',
194         'shell/dynamic_service_runner.h',
195         'shell/init.cc',
196         'shell/init.h',
197         'shell/in_process_dynamic_service_runner.cc',
198         'shell/in_process_dynamic_service_runner.h',
199         'shell/keep_alive.cc',
200         'shell/keep_alive.h',
201         'shell/mojo_url_resolver.cc',
202         'shell/mojo_url_resolver.h',
203         'shell/out_of_process_dynamic_service_runner.cc',
204         'shell/out_of_process_dynamic_service_runner.h',
205         'shell/run.cc',
206         'shell/run.h',
207         'shell/switches.cc',
208         'shell/switches.h',
209         'shell/task_runners.cc',
210         'shell/task_runners.h',
211         'shell/test_child_process.cc',
212         'shell/test_child_process.h',
213         'shell/ui_service_loader_android.cc',
214         'shell/ui_service_loader_android.h',
215         'shell/view_manager_loader.cc',
216         'shell/view_manager_loader.h',
217       ],
218       'conditions': [
219         ['OS=="linux"', {
220           'dependencies': [
221             '../build/linux/system.gyp:dbus',
222             '../dbus/dbus.gyp:dbus',
223           ],
224         }],
225         ['OS=="android"', {
226           'dependencies': [
227             'mojo_network_service_lib',
228           ],
229           'sources': [
230             'shell/network_service_loader.cc',
231             'shell/network_service_loader.h',
232           ],
233         }],
234         ['use_aura==1', {
235           'dependencies': [
236             # These are only necessary as long as we hard code use of ViewManager.
237             '../skia/skia.gyp:skia',
238             'mojo_gles2',
239             'mojo_view_manager',
240             'mojo_view_manager_bindings',
241           ],
242         }, {  # use_aura==0
243           'sources!': [
244             'shell/view_manager_loader.cc',
245             'shell/view_manager_loader.h',
246           ],
247         }],
248       ],
249     },
250     {
251       'target_name': 'mojo_shell_test_support',
252       'type': 'static_library',
253       'dependencies': [
254         '../base/base.gyp:base',
255         '../base/base.gyp:base_static',
256         '../url/url.gyp:url_lib',
257         'mojo_base.gyp:mojo_system_impl',
258         'mojo_service_manager',
259         'mojo_shell_lib',
260       ],
261       'sources': [
262         'shell/shell_test_helper.cc',
263         'shell/shell_test_helper.h',
264       ],
265     },
266     {
267       # GN version: //mojo/shell
268       'target_name': 'mojo_shell',
269       'type': 'executable',
270       'dependencies': [
271         '../base/base.gyp:base',
272         '../ui/gl/gl.gyp:gl',
273         '../url/url.gyp:url_lib',
274         'mojo_base.gyp:mojo_common_lib',
275         'mojo_base.gyp:mojo_environment_chromium',
276         'mojo_base.gyp:mojo_system_impl',
277         'mojo_service_manager',
278         'mojo_shell_lib',
279       ],
280       'conditions': [
281         ['use_ozone==1', {
282           'dependencies': [
283             '../ui/ozone/ozone.gyp:ozone',
284           ],
285         }],
286       ],
287       'sources': [
288         'shell/desktop/mojo_main.cc',
289       ],
290     },
291     {
292       'target_name': 'mojo_shell_tests',
293       'type': '<(gtest_target_type)',
294       'dependencies': [
295         '../base/base.gyp:base',
296         '../base/base.gyp:base_i18n',
297         '../base/base.gyp:test_support_base',
298         '../testing/gtest.gyp:gtest',
299         '../net/net.gyp:net_test_support',
300         # TODO(vtl): We don't currently need this, but I imagine we will soon.
301         # '../ui/gl/gl.gyp:gl',
302         '../url/url.gyp:url_lib',
303         'mojo_base.gyp:mojo_common_lib',
304         'mojo_base.gyp:mojo_environment_chromium',
305         'mojo_base.gyp:mojo_system_impl',
306         'mojo_service_manager',
307         'mojo_shell_lib',
308         'mojo_test_app',
309         'mojo_test_request_tracker_app',
310         'mojo_test_service_bindings',
311       ],
312       'sources': [
313         'shell/child_process_host_unittest.cc',
314         'shell/dynamic_service_loader_unittest.cc',
315         'shell/in_process_dynamic_service_runner_unittest.cc',
316         'shell/shell_test_base.cc',
317         'shell/shell_test_base.h',
318         'shell/shell_test_base_unittest.cc',
319         'shell/shell_test_main.cc',
320       ],
321       'conditions': [
322         ['OS == "android"', {
323           'dependencies': [
324             '../testing/android/native_test.gyp:native_test_native_code',
325           ],
326         }],
327       ],
328     },
329     {
330       # GN version: //mojo/service_manager
331       'target_name': 'mojo_service_manager',
332       'type': '<(component)',
333       'defines': [
334         'MOJO_SERVICE_MANAGER_IMPLEMENTATION',
335       ],
336       'dependencies': [
337         '../base/base.gyp:base',
338         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
339         '../net/net.gyp:net',
340         '../url/url.gyp:url_lib',
341         'mojo_base.gyp:mojo_application_bindings',
342         'mojo_base.gyp:mojo_common_lib',
343         'mojo_base.gyp:mojo_environment_chromium',
344         '<(mojo_system_for_component)',
345       ],
346       'sources': [
347         'service_manager/background_service_loader.cc',
348         'service_manager/background_service_loader.h',
349         'service_manager/service_loader.h',
350         'service_manager/service_manager.cc',
351         'service_manager/service_manager.h',
352         'service_manager/service_manager_export.h',
353       ],
354       'export_dependent_settings': [
355         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
356         'mojo_base.gyp:mojo_application_bindings',
357       ],
358     },
359     {
360       'target_name': 'mojo_service_manager_unittests',
361       'type': 'executable',
362       'dependencies': [
363         '../base/base.gyp:base',
364         '../testing/gtest.gyp:gtest',
365         '../url/url.gyp:url_lib',
366         'mojo_base.gyp:mojo_common_lib',
367         'mojo_base.gyp:mojo_cpp_bindings',
368         'mojo_base.gyp:mojo_environment_chromium',
369         'mojo_base.gyp:mojo_run_all_unittests',
370         'mojo_base.gyp:mojo_application',
371         'mojo_service_manager',
372       ],
373       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
374       'sources': [
375         'service_manager/service_manager_unittest.cc',
376         'service_manager/test.mojom',
377       ],
378     },
379     {
380       # GN version: //mojo/cc
381       'target_name': 'mojo_cc_support',
382       'type': 'static_library',
383       'dependencies': [
384         '../base/base.gyp:base',
385         '../cc/cc.gyp:cc',
386         '../skia/skia.gyp:skia',
387         '../gpu/gpu.gyp:gles2_implementation',
388         'mojo_gles2',
389       ],
390       'sources': [
391         'cc/context_provider_mojo.cc',
392         'cc/context_provider_mojo.h',
393       ],
394     },
395   ],
396   'conditions': [
397     ['OS=="android"', {
398       'targets': [
399         {
400           'target_name': 'mojo_native_viewport_java',
401           'type': 'none',
402           'dependencies': [
403             '../base/base.gyp:base_java',
404           ],
405           'variables': {
406             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
407           },
408           'includes': [ '../build/java.gypi' ],
409         },
410         {
411           'target_name': 'libmojo_shell',
412           'type': 'shared_library',
413           'dependencies': [
414             '../base/base.gyp:base',
415             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
416             '../ui/gfx/gfx.gyp:gfx',
417             '../ui/gfx/gfx.gyp:gfx_geometry',
418             '../ui/gl/gl.gyp:gl',
419             'mojo_base.gyp:mojo_application_bindings',
420             'mojo_base.gyp:mojo_common_lib',
421             'mojo_base.gyp:mojo_environment_chromium',
422             'mojo_base.gyp:mojo_jni_headers',
423             'mojo_shell_lib',
424           ],
425           'sources': [
426             'shell/android/library_loader.cc',
427             'shell/android/mojo_main.cc',
428             'shell/android/mojo_main.h',
429           ],
430         },
431         {
432           'target_name': 'mojo_shell_apk',
433           'type': 'none',
434           'dependencies': [
435             '../base/base.gyp:base_java',
436             '../net/net.gyp:net_java',
437             'mojo_native_viewport_java',
438             'libmojo_shell',
439           ],
440           'variables': {
441             'apk_name': 'MojoShell',
442             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
443             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
444             'native_lib_target': 'libmojo_shell',
445           },
446           'includes': [ '../build/java_apk.gypi' ],
447         }
448       ],
449     }],
450     ['OS=="linux"', {
451       'targets': [
452         {
453           'target_name': 'mojo_dbus_service',
454           'type': 'static_library',
455           'dependencies': [
456             '../base/base.gyp:base',
457             '../build/linux/system.gyp:dbus',
458             '../dbus/dbus.gyp:dbus',
459             'mojo_base.gyp:mojo_application',
460             'mojo_base.gyp:mojo_common_lib',
461             'mojo_base.gyp:mojo_system_impl',
462             'mojo_external_service_bindings',
463           ],
464           'sources': [
465             'dbus/dbus_external_service.h',
466             'dbus/dbus_external_service.cc',
467           ],
468         },
469       ],
470     }],
471     ['use_aura==1', {
472       'targets': [
473         {
474           'target_name': 'mojo_aura_support',
475           'type': 'static_library',
476           'dependencies': [
477             '../cc/cc.gyp:cc',
478             '../ui/aura/aura.gyp:aura',
479             '../ui/compositor/compositor.gyp:compositor',
480             '../ui/events/events.gyp:events',
481             '../ui/events/events.gyp:events_base',
482             '../ui/gl/gl.gyp:gl',
483             '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
484             'mojo_cc_support',
485             'mojo_gles2',
486             'mojo_native_viewport_bindings',
487           ],
488           'sources': [
489             'aura/aura_init.cc',
490             'aura/aura_init.h',
491             'aura/context_factory_mojo.cc',
492             'aura/context_factory_mojo.h',
493             'aura/screen_mojo.cc',
494             'aura/screen_mojo.h',
495             'aura/window_tree_host_mojo.cc',
496             'aura/window_tree_host_mojo.h',
497             'aura/window_tree_host_mojo_delegate.h',
498           ],
499         },
500         {
501           'target_name': 'mojo_views_support',
502           'type': 'static_library',
503           'dependencies': [
504             '../base/base.gyp:base',
505             '../base/base.gyp:base_i18n',
506             '../skia/skia.gyp:skia',
507             '../skia/skia.gyp:skia',
508             '../third_party/icu/icu.gyp:icui18n',
509             '../third_party/icu/icu.gyp:icuuc',
510             '../ui/aura/aura.gyp:aura',
511             '../ui/base/ui_base.gyp:ui_base',
512             '../ui/views/views.gyp:views',
513             '../ui/wm/wm.gyp:wm',
514             'mojo_aura_support',
515             'mojo_views_support_internal',
516           ],
517           'sources': [
518             'views/native_widget_view_manager.cc',
519             'views/native_widget_view_manager.h',
520             'views/views_init.cc',
521             'views/views_init.h',
522           ],
523         },
524         {
525           'target_name': 'mojo_views_support_internal',
526           'type': '<(component)',
527           'dependencies': [
528             '../base/base.gyp:base',
529             '../base/base.gyp:base_i18n',
530             '../base/base.gyp:base_static',
531             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
532             '../skia/skia.gyp:skia',
533             '../skia/skia.gyp:skia',
534             '../third_party/icu/icu.gyp:icui18n',
535             '../third_party/icu/icu.gyp:icuuc',
536             '../ui/base/ui_base.gyp:ui_base',
537             '../ui/gfx/gfx.gyp:gfx',
538           ],
539           'sources': [
540             'views/mojo_views_export.h',
541             'views/views_init_internal.cc',
542             'views/views_init_internal.h',
543           ],
544           'defines': [
545             'MOJO_VIEWS_IMPLEMENTATION',
546           ],
547         },
548       ],
549     }],
550   ],