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