Revert of Enabling audio quality test on mac. (patchset #1 id:1 of https://codereview...
[chromium-blink-merge.git] / mojo / mojo.gyp
blobc9d27b56aafc67528157196ce202b507228435a5
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       # GN version: //mojo
25       'target_name': 'mojo',
26       'type': 'none',
27       'dependencies': [
28         'mojo_application_manager',
29         'mojo_application_manager_unittests',
30         'mojo_apps_js_unittests',
31         'mojo_base.gyp:mojo_base',
32         'mojo_clipboard',
33         'mojo_clipboard_unittests',
34         'mojo_compositor_app',
35         'mojo_content_handler_demo',
36         'mojo_echo_client',
37         'mojo_echo_service',
38         'mojo_example_apptests',
39         'mojo_example_service',
40         'mojo_geometry_lib',
41         'mojo_html_viewer',
42         'mojo_js',
43         'mojo_native_viewport_service',
44         'mojo_network_service',
45         'mojo_pepper_container_app',
46         'mojo_png_viewer',
47         'mojo_sample_app',
48         'mojo_shell',
49         'mojo_shell_lib',
50         'mojo_shell_tests',
51         'mojo_surfaces_app',
52         'mojo_surfaces_app',
53         'mojo_surfaces_child_app',
54         'mojo_surfaces_child_gl_app',
55         'mojo_surfaces_lib',
56         'mojo_surfaces_lib_unittests',
57         'mojo_surfaces_service',
58         'mojo_test_app',
59         'mojo_test_request_tracker_app',
60         'mojo_view_manager_lib',
61         'mojo_view_manager_lib_unittests',
62         'mojo_wget',
63       ],
64       'conditions': [
65         ['use_aura==1', {
66           'dependencies': [
67             'mojo_aura_demo',
68             'mojo_aura_demo_init',
69             'mojo_browser',
70             'mojo_core_window_manager',
71             'mojo_core_window_manager_unittests',
72             'mojo_demo_launcher',
73             'mojo_embedded_app',
74             'mojo_keyboard',
75             'mojo_media_viewer',
76             'mojo_nesting_app',
77             'mojo_window_manager',
78             'mojo_wm_flow_app',
79             'mojo_wm_flow_embedded',
80             'mojo_wm_flow_init',
81             'mojo_wm_flow_wm',
82             'mojo_view_manager',
83             'mojo_view_manager_unittests',
84           ],
85         }],
86         ['OS == "linux"', {
87           'dependencies': [
88             'mojo_dbus_echo',
89             'mojo_dbus_echo_service',
90             'mojo_external_application_tests',
91           ],
92         }],
93         ['component != "shared_library" and OS == "linux"', {
94           'dependencies': [
95             'mojo_python_bindings',
96             'mojo_python_embedder',
97             'mojo_python_system',
98             'mojo_python',
99           ],
100         }],
101       ]
102     },
103     {
104       # GN version: //mojo/shell:external_service_bindings
105       'target_name': 'mojo_external_service_bindings',
106       'type': 'static_library',
107       'sources': [
108         'shell/external_service.mojom',
109       ],
110       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
111       'export_dependent_settings': [
112         'mojo_base.gyp:mojo_cpp_bindings',
113       ],
114       'dependencies': [
115         'mojo_base.gyp:mojo_cpp_bindings',
116       ],
117     },
118     {
119       # GN version: //mojo/spy
120       'target_name': 'mojo_spy',
121       'type': 'static_library',
122       'dependencies': [
123         '../base/base.gyp:base',
124         '../base/base.gyp:base_static',
125         '../net/net.gyp:http_server',
126         '../url/url.gyp:url_lib',
127         'mojo_application_manager',
128       ],
129       'variables': {
130         'mojom_base_output_dir': 'mojo',
131       },
132       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
133       'sources': [
134         'spy/public/spy.mojom',
135         'spy/common.h',
136         'spy/spy.cc',
137         'spy/spy.h',
138         'spy/spy_server_impl.h',
139         'spy/spy_server_impl.cc',
140         'spy/websocket_server.cc',
141         'spy/websocket_server.h',
142       ],
143     },
144     {
145       # GN version: //mojo/shell:lib
146       'target_name': 'mojo_shell_lib',
147       'type': 'static_library',
148       'dependencies': [
149         '../base/base.gyp:base',
150         '../base/base.gyp:base_static',
151         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
152         'mojo_application_manager',
153         'mojo_base.gyp:mojo_application_bindings',
154         'mojo_base.gyp:mojo_common_lib',
155         'mojo_base.gyp:mojo_gles2_impl',
156         'mojo_base.gyp:mojo_system_impl',
157         'mojo_base.gyp:mojo_application_chromium',
158         'mojo_external_service_bindings',
159         'mojo_network_bindings',
160         'mojo_spy',
161       ],
162       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
163       'sources': [
164         'shell/app_child_process.cc',
165         'shell/app_child_process.h',
166         'shell/app_child_process.mojom',
167         'shell/app_child_process_host.cc',
168         'shell/app_child_process_host.h',
169         'shell/child_process.cc',
170         'shell/child_process.h',
171         'shell/child_process_host.cc',
172         'shell/child_process_host.h',
173         'shell/context.cc',
174         'shell/context.h',
175         'shell/dbus_application_loader_linux.cc',
176         'shell/dbus_application_loader_linux.h',
177         'shell/dynamic_application_loader.cc',
178         'shell/dynamic_application_loader.h',
179         'shell/dynamic_service_runner.h',
180         'shell/external_application_listener_posix.cc',
181         'shell/external_application_listener_win.cc',
182         'shell/external_application_listener.h',
183         'shell/external_application_registrar.mojom',
184         'shell/incoming_connection_listener_posix.cc',
185         'shell/incoming_connection_listener_posix.h',
186         'shell/init.cc',
187         'shell/init.h',
188         'shell/in_process_dynamic_service_runner.cc',
189         'shell/in_process_dynamic_service_runner.h',
190         'shell/mojo_url_resolver.cc',
191         'shell/mojo_url_resolver.h',
192         'shell/out_of_process_dynamic_service_runner.cc',
193         'shell/out_of_process_dynamic_service_runner.h',
194         'shell/switches.cc',
195         'shell/switches.h',
196         'shell/task_runners.cc',
197         'shell/task_runners.h',
198         'shell/test_child_process.cc',
199         'shell/test_child_process.h',
200         'shell/ui_application_loader_android.cc',
201         'shell/ui_application_loader_android.h',
202       ],
203       'conditions': [
204         ['component=="shared_library"', {
205           'dependencies': [
206             '../ui/gl/gl.gyp:gl',
207           ],
208         }],
209         ['OS=="linux"', {
210           'dependencies': [
211             '../build/linux/system.gyp:dbus',
212             '../dbus/dbus.gyp:dbus',
213           ],
214           'sources': [
215             'shell/external_application_registrar_connection.cc',
216             'shell/external_application_registrar_connection.h',
217           ],
218         }],
219         ['OS=="android"', {
220           'dependencies': [
221             'mojo_network_service_lib',
222             'mojo_native_viewport_service_lib',
223           ],
224           'sources': [
225             'shell/network_application_loader.cc',
226             'shell/network_application_loader.h',
227           ],
228         }],
229       ],
230     },
231     {
232       # GN version: //mojo/shell:test_support
233       'target_name': 'mojo_shell_test_support',
234       'type': 'static_library',
235       'dependencies': [
236         '../base/base.gyp:base_static',
237         'mojo_base.gyp:mojo_system_impl',
238         'mojo_shell_lib',
239       ],
240       'sources': [
241         'shell/shell_test_helper.cc',
242         'shell/shell_test_helper.h',
243       ],
244     },
245     {
246       # GN version: //mojo/shell
247       'target_name': 'mojo_shell',
248       'type': 'executable',
249       'dependencies': [
250         '../base/base.gyp:base',
251         'mojo_base.gyp:mojo_common_lib',
252         'mojo_base.gyp:mojo_environment_chromium',
253         'mojo_shell_lib',
254       ],
255       'sources': [
256         'shell/desktop/mojo_main.cc',
257       ],
258       'conditions': [
259         ['component=="shared_library"', {
260           'dependencies': [
261             '../ui/gfx/gfx.gyp:gfx',
262           ],
263         }],
264       ],
265     },
266     {
267       # GN version: //mojo/shell:mojo_shell_tests
268       'target_name': 'mojo_shell_tests',
269       'type': '<(gtest_target_type)',
270       'dependencies': [
271         '../base/base.gyp:base',
272         '../base/base.gyp:base_i18n',
273         '../base/base.gyp:test_support_base',
274         '../testing/gtest.gyp:gtest',
275         '../net/net.gyp:net_test_support',
276         '../url/url.gyp:url_lib',
277         'mojo_application_manager',
278         'mojo_base.gyp:mojo_common_lib',
279         'mojo_base.gyp:mojo_environment_chromium',
280         'mojo_base.gyp:mojo_system_impl',
281         'mojo_shell_lib',
282         'mojo_test_app',
283         'mojo_test_request_tracker_app',
284         'mojo_test_service_bindings',
285       ],
286       'sources': [
287         'shell/child_process_host_unittest.cc',
288         'shell/dynamic_application_loader_unittest.cc',
289         'shell/in_process_dynamic_service_runner_unittest.cc',
290         'shell/shell_test_base.cc',
291         'shell/shell_test_base.h',
292         'shell/shell_test_base_unittest.cc',
293         'shell/shell_test_main.cc',
294       ],
295       'conditions': [
296         ['OS == "android"', {
297           'dependencies': [
298             '../testing/android/native_test.gyp:native_test_native_code',
299           ],
300         }],
301       ],
302     },
303     {
304       # GN version: //mojo/application_manager
305       'target_name': 'mojo_application_manager',
306       'type': '<(component)',
307       'defines': [
308         'MOJO_APPLICATION_MANAGER_IMPLEMENTATION',
309       ],
310       'dependencies': [
311         '../base/base.gyp:base',
312         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
313         '../url/url.gyp:url_lib',
314         'mojo_content_handler_bindings',
315         'mojo_network_bindings',
316         'mojo_base.gyp:mojo_application_bindings',
317         'mojo_base.gyp:mojo_common_lib',
318         'mojo_base.gyp:mojo_environment_chromium',
319         '<(mojo_system_for_component)',
320       ],
321       'sources': [
322         'application_manager/application_loader.cc',
323         'application_manager/application_loader.h',
324         'application_manager/application_manager.cc',
325         'application_manager/application_manager.h',
326         'application_manager/application_manager_export.h',
327         'application_manager/background_shell_application_loader.cc',
328         'application_manager/background_shell_application_loader.h',
329       ],
330       'export_dependent_settings': [
331         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
332         'mojo_base.gyp:mojo_application_bindings',
333         'mojo_network_bindings',
334       ],
335     },
336     {
337       # GN version: //mojo/application_manager:mojo_application_manager_unittests
338       'target_name': 'mojo_application_manager_unittests',
339       'type': 'executable',
340       'dependencies': [
341         '../base/base.gyp:base',
342         '../testing/gtest.gyp:gtest',
343         '../url/url.gyp:url_lib',
344         'mojo_application_manager',
345         'mojo_base.gyp:mojo_common_lib',
346         'mojo_base.gyp:mojo_cpp_bindings',
347         'mojo_base.gyp:mojo_environment_chromium',
348         'mojo_base.gyp:mojo_run_all_unittests',
349         'mojo_base.gyp:mojo_application_chromium',
350       ],
351       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
352       'sources': [
353         'application_manager/application_manager_unittest.cc',
354         'application_manager/background_shell_application_loader_unittest.cc',
355         'application_manager/test.mojom',
356       ],
357     },
358     {
359       # GN version: //mojo/cc
360       'target_name': 'mojo_cc_support',
361       'type': 'static_library',
362       'dependencies': [
363         '../base/base.gyp:base',
364         '../cc/cc.gyp:cc',
365         '../cc/cc.gyp:cc_surfaces',
366         '../skia/skia.gyp:skia',
367         '../gpu/gpu.gyp:gles2_implementation',
368         'mojo_geometry_lib',
369         'mojo_surfaces_bindings',
370         'mojo_surfaces_lib',
371       ],
372       'includes': [
373         'mojo_public_gles2_for_loadable_module.gypi',
374       ],
375       'export_dependent_settings': [
376         'mojo_surfaces_bindings',
377       ],
378       'sources': [
379         'cc/context_provider_mojo.cc',
380         'cc/context_provider_mojo.h',
381         'cc/output_surface_mojo.cc',
382         'cc/output_surface_mojo.h',
383       ],
384     },
385   ],
386   'conditions': [
387     ['OS=="android"', {
388       'targets': [
389         {
390           'target_name': 'mojo_native_viewport_java',
391           'type': 'none',
392           'dependencies': [
393             '../base/base.gyp:base_java',
394           ],
395           'variables': {
396             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
397           },
398           'includes': [ '../build/java.gypi' ],
399         },
400         {
401           'target_name': 'libmojo_shell',
402           'type': 'shared_library',
403           'dependencies': [
404             '../base/base.gyp:base',
405             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
406             '../ui/gfx/gfx.gyp:gfx',
407             '../ui/gfx/gfx.gyp:gfx_geometry',
408             '../ui/gl/gl.gyp:gl',
409             'mojo_base.gyp:mojo_application_bindings',
410             'mojo_base.gyp:mojo_common_lib',
411             'mojo_base.gyp:mojo_environment_chromium',
412             'mojo_base.gyp:mojo_jni_headers',
413             'mojo_shell_lib',
414           ],
415           'sources': [
416             'shell/android/library_loader.cc',
417             'shell/android/mojo_main.cc',
418             'shell/android/mojo_main.h',
419           ],
420         },
421         {
422           'target_name': 'mojo_shell_apk',
423           'type': 'none',
424           'dependencies': [
425             '../base/base.gyp:base_java',
426             '../net/net.gyp:net_java',
427             'mojo_native_viewport_java',
428             'libmojo_shell',
429           ],
430           'variables': {
431             'apk_name': 'MojoShell',
432             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
433             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
434             'native_lib_target': 'libmojo_shell',
435           },
436           'includes': [ '../build/java_apk.gypi' ],
437         }
438       ],
439     }],
440     ['OS=="linux"', {
441       'targets': [
442         {
443           # GN version: //mojo/dbus
444           'target_name': 'mojo_dbus_service',
445           'type': 'static_library',
446           'dependencies': [
447             '../base/base.gyp:base',
448             '../build/linux/system.gyp:dbus',
449             '../dbus/dbus.gyp:dbus',
450             'mojo_base.gyp:mojo_application_chromium',
451             'mojo_base.gyp:mojo_common_lib',
452             'mojo_base.gyp:mojo_system_impl',
453             'mojo_external_service_bindings',
454           ],
455           'sources': [
456             'dbus/dbus_external_service.h',
457             'dbus/dbus_external_service.cc',
458           ],
459         },
460         {
461           # GN version: //mojo/shell:mojo_external_application_tests
462           'target_name': 'mojo_external_application_tests',
463           'type': '<(gtest_target_type)',
464           'dependencies': [
465             '../base/base.gyp:base',
466             '../base/base.gyp:test_support_base',
467             '../testing/gtest.gyp:gtest',
468             '../net/net.gyp:net_test_support',
469             '../url/url.gyp:url_lib',
470             'mojo_application_manager',
471             'mojo_base.gyp:mojo_common_lib',
472             'mojo_base.gyp:mojo_environment_chromium',
473             'mojo_base.gyp:mojo_system_impl',
474             'mojo_shell_lib',
475           ],
476           'sources': [
477             'shell/incoming_connection_listener_unittest.cc',
478             'shell/external_application_listener_unittest.cc',
479             'shell/external_application_test_main.cc',
480           ],
481         },
482       ],
483     }],
484     ['use_aura==1', {
485       'targets': [
486         {
487           # GN version: //mojo/aura
488           'target_name': 'mojo_aura_support',
489           'type': 'static_library',
490           'dependencies': [
491             '../cc/cc.gyp:cc',
492             '../ui/aura/aura.gyp:aura',
493             '../ui/compositor/compositor.gyp:compositor',
494             '../ui/events/events.gyp:events',
495             '../ui/events/events.gyp:events_base',
496             'mojo_cc_support',
497             'mojo_native_viewport_bindings',
498           ],
499           'includes': [
500             'mojo_public_gles2_for_loadable_module.gypi',
501           ],
502           'sources': [
503             'aura/aura_init.cc',
504             'aura/aura_init.h',
505             'aura/context_factory_mojo.cc',
506             'aura/context_factory_mojo.h',
507             'aura/screen_mojo.cc',
508             'aura/screen_mojo.h',
509             'aura/window_tree_host_mojo.cc',
510             'aura/window_tree_host_mojo.h',
511             'aura/window_tree_host_mojo_delegate.h',
512           ],
513         },
514         {
515           # GN version: //mojo/views
516           'target_name': 'mojo_views_support',
517           'type': 'static_library',
518           'dependencies': [
519             '../base/base.gyp:base',
520             '../base/base.gyp:base_i18n',
521             '../skia/skia.gyp:skia',
522             '../third_party/icu/icu.gyp:icui18n',
523             '../third_party/icu/icu.gyp:icuuc',
524             '../ui/aura/aura.gyp:aura',
525             '../ui/base/ui_base.gyp:ui_base',
526             '../ui/views/views.gyp:views',
527             '../ui/wm/wm.gyp:wm',
528             'mojo_aura_support',
529             'mojo_views_support_internal',
530             'mojo_view_manager_bindings',
531           ],
532           'sources': [
533             'views/input_method_mojo_linux.cc',
534             'views/input_method_mojo_linux.h',
535             'views/native_widget_view_manager.cc',
536             'views/native_widget_view_manager.h',
537             'views/views_init.cc',
538             'views/views_init.h',
539           ],
540         },
541         {
542           # GN version: //mojo/views:views_internal
543           'target_name': 'mojo_views_support_internal',
544           'type': '<(component)',
545           'dependencies': [
546             '../base/base.gyp:base',
547             '../base/base.gyp:base_i18n',
548             '../base/base.gyp:base_static',
549             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
550             '../skia/skia.gyp:skia',
551             '../third_party/icu/icu.gyp:icui18n',
552             '../third_party/icu/icu.gyp:icuuc',
553             '../ui/base/ui_base.gyp:ui_base',
554             '../ui/gfx/gfx.gyp:gfx',
555           ],
556           'sources': [
557             'views/mojo_views_export.h',
558             'views/views_init_internal.cc',
559             'views/views_init_internal.h',
560           ],
561           'defines': [
562             'MOJO_VIEWS_IMPLEMENTATION',
563           ],
564         },
565       ],
566     }],
567     ['component!="shared_library" and OS=="linux"', {
568       'targets': [
569         {
570           # GN version: //mojo/public/python:system
571           'target_name': 'mojo_python_system',
572           'variables': {
573             'python_base_module': 'mojo',
574             'python_cython_module': 'system',
575           },
576           'sources': [
577             'public/python/mojo/c_core.pxd',
578             'public/python/mojo/c_environment.pxd',
579             'public/python/mojo/system.pyx',
580             'public/python/src/python_system_helper.cc',
581             'public/python/src/python_system_helper.h',
582           ],
583           'dependencies': [
584             'mojo_base.gyp:mojo_environment_standalone',
585             'mojo_base.gyp:mojo_system',
586             'mojo_base.gyp:mojo_utility',
587           ],
588           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
589         },
590         {
591           # GN version: //mojo/python:embedder
592           'target_name': 'mojo_python_embedder',
593           'type': 'loadable_module',
594           'variables': {
595             'python_base_module': 'mojo',
596             'python_cython_module': 'embedder',
597           },
598           'sources': [
599             'python/system/mojo/embedder.pyx',
600           ],
601           'dependencies': [
602             'mojo_base.gyp:mojo_system_impl',
603           ],
604           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
605         },
606         {
607           # GN version: //mojo/public/python:bindings
608           'target_name': 'mojo_python_bindings',
609           'type': 'none',
610           'variables': {
611             'python_base_module': 'mojo/bindings',
612           },
613           'sources': [
614             'public/python/mojo/bindings/__init__.py',
615             'public/python/mojo/bindings/descriptor.py',
616             'public/python/mojo/bindings/messaging.py',
617             'public/python/mojo/bindings/reflection.py',
618             'public/python/mojo/bindings/serialization.py',
619           ],
620           'dependencies': [
621             'mojo_python_system',
622           ],
623           'includes': [ '../third_party/cython/python_module.gypi' ],
624         },
625         {
626           # GN version: //mojo/python
627           'target_name': 'mojo_python',
628           'type': 'none',
629           'variables': {
630             'python_base_module': 'mojo',
631           },
632           'sources': [
633             'public/python/mojo/__init__.py',
634           ],
635           'dependencies': [
636             'mojo_python_bindings',
637             'mojo_python_embedder',
638             'mojo_python_system',
639           ],
640           # The python module need to be copied to their destinations
641           'actions': [
642             {
643               'action_name': 'Copy system module.',
644               'inputs': [
645                 '<(DEPTH)/build/cp.py',
646                 '<(PRODUCT_DIR)/libmojo_python_system.so',
647               ],
648               'outputs': [
649                 '<(PRODUCT_DIR)/python/mojo/system.so',
650               ],
651               'action': [
652                 'python',
653                 '<@(_inputs)',
654                 '<@(_outputs)',
655               ]
656             },
657             {
658               'action_name': 'Copy embedder module.',
659               'inputs': [
660                 '<(DEPTH)/build/cp.py',
661                 '<(PRODUCT_DIR)/libmojo_python_embedder.so',
662               ],
663               'outputs': [
664                 '<(PRODUCT_DIR)/python/mojo/embedder.so',
665               ],
666               'action': [
667                 'python',
668                 '<@(_inputs)',
669                 '<@(_outputs)',
670               ]
671             },
672           ],
673           'includes': [ '../third_party/cython/python_module.gypi' ],
674         },
675       ],
676     }],
677     ['component!="shared_library" and OS=="linux" and test_isolation_mode!="noop"', {
678       'targets': [
679         {
680           'target_name': 'mojo_python_unittests_run',
681           'type': 'none',
682           'dependencies': [
683             'mojo_python',
684             'mojo_base.gyp:mojo_public_test_interfaces',
685           ],
686           'includes': [
687             '../build/isolate.gypi',
688             'mojo_python_unittests.isolate',
689           ],
690           'sources': [
691             'mojo_python_unittests.isolate',
692           ],
693         },
694       ],
695     }],
696   ],