ozone: gbm: Fix missing OVERRIDE
[chromium-blink-merge.git] / mojo / mojo.gyp
blobc94cf09f336d76813dfe24442d3b45d8bd118973
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_application_manager',
28         'mojo_application_manager_unittests',
29         'mojo_apps_js_unittests',
30         'mojo_base.gyp:mojo_base',
31         'mojo_compositor_app',
32         'mojo_content_handler_demo',
33         'mojo_echo_client',
34         'mojo_echo_service',
35         'mojo_example_apptests',
36         'mojo_example_service',
37         'mojo_geometry_lib',
38         'mojo_html_viewer',
39         'mojo_js',
40         'mojo_launcher',
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_embedder',
93             'mojo_python_system',
94             'mojo_python',
95           ],
96         }],
97       ]
98     },
99     {
100       # GN version: //mojo/shell:external_service_bindings
101       'target_name': 'mojo_external_service_bindings',
102       'type': 'static_library',
103       'sources': [
104         'shell/external_service.mojom',
105       ],
106       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
107       'export_dependent_settings': [
108         'mojo_base.gyp:mojo_cpp_bindings',
109       ],
110       'dependencies': [
111         'mojo_base.gyp:mojo_cpp_bindings',
112       ],
113     },
114     {
115       'target_name': 'mojo_spy',
116       'type': 'static_library',
117       'dependencies': [
118         '../base/base.gyp:base',
119         '../base/base.gyp:base_static',
120         '../net/net.gyp:http_server',
121         '../url/url.gyp:url_lib',
122         'mojo_application_manager',
123       ],
124       'variables': {
125         'mojom_base_output_dir': 'mojo',
126       },
127       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
128       'sources': [
129         'spy/public/spy.mojom',
130         'spy/common.h',
131         'spy/spy.cc',
132         'spy/spy.h',
133         'spy/spy_server_impl.h',
134         'spy/spy_server_impl.cc',
135         'spy/websocket_server.cc',
136         'spy/websocket_server.h',
137       ],
138     },
139     {
140       # GN version: //mojo/shell:lib
141       'target_name': 'mojo_shell_lib',
142       'type': 'static_library',
143       'dependencies': [
144         '../base/base.gyp:base',
145         '../base/base.gyp:base_static',
146         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
147         '../net/net.gyp:net',
148         '../url/url.gyp:url_lib',
149         'mojo_application_manager',
150         'mojo_base.gyp:mojo_application_bindings',
151         'mojo_base.gyp:mojo_common_lib',
152         'mojo_base.gyp:mojo_gles2_impl',
153         'mojo_base.gyp:mojo_system_impl',
154         'mojo_base.gyp:mojo_application_chromium',
155         'mojo_external_service_bindings',
156         'mojo_native_viewport_service_lib',
157         'mojo_network_bindings',
158         'mojo_spy',
159       ],
160       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
161       'sources': [
162         'shell/app_child_process.cc',
163         'shell/app_child_process.h',
164         'shell/app_child_process.mojom',
165         'shell/app_child_process_host.cc',
166         'shell/app_child_process_host.h',
167         'shell/child_process.cc',
168         'shell/child_process.h',
169         'shell/child_process_host.cc',
170         'shell/child_process_host.h',
171         'shell/context.cc',
172         'shell/context.h',
173         'shell/dbus_application_loader_linux.cc',
174         'shell/dbus_application_loader_linux.h',
175         'shell/dynamic_application_loader.cc',
176         'shell/dynamic_application_loader.h',
177         'shell/dynamic_service_runner.h',
178         'shell/init.cc',
179         'shell/init.h',
180         'shell/in_process_dynamic_service_runner.cc',
181         'shell/in_process_dynamic_service_runner.h',
182         'shell/mojo_url_resolver.cc',
183         'shell/mojo_url_resolver.h',
184         'shell/out_of_process_dynamic_service_runner.cc',
185         'shell/out_of_process_dynamic_service_runner.h',
186         'shell/switches.cc',
187         'shell/switches.h',
188         'shell/task_runners.cc',
189         'shell/task_runners.h',
190         'shell/test_child_process.cc',
191         'shell/test_child_process.h',
192         'shell/ui_application_loader_android.cc',
193         'shell/ui_application_loader_android.h',
194         'shell/view_manager_loader.cc',
195         'shell/view_manager_loader.h',
196       ],
197       'conditions': [
198         ['OS=="linux"', {
199           'dependencies': [
200             '../build/linux/system.gyp:dbus',
201             '../dbus/dbus.gyp:dbus',
202           ],
203         }],
204         ['OS=="android"', {
205           'dependencies': [
206             'mojo_network_service_lib',
207           ],
208           'sources': [
209             'shell/network_application_loader.cc',
210             'shell/network_application_loader.h',
211           ],
212         }],
213         ['use_aura==1', {
214           'dependencies': [
215             # These are only necessary as long as we hard code use of ViewManager.
216             '../skia/skia.gyp:skia',
217             'mojo_view_manager',
218             'mojo_view_manager_bindings',
219           ],
220         }, {  # use_aura==0
221           'sources!': [
222             'shell/view_manager_loader.cc',
223             'shell/view_manager_loader.h',
224           ],
225         }],
226       ],
227     },
228     {
229       # GN version: //mojo/shell:test_support
230       'target_name': 'mojo_shell_test_support',
231       'type': 'static_library',
232       'dependencies': [
233         '../base/base.gyp:base',
234         '../base/base.gyp:base_static',
235         '../url/url.gyp:url_lib',
236         'mojo_application_manager',
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         '../ui/gl/gl.gyp:gl',
252         '../url/url.gyp:url_lib',
253         'mojo_application_manager',
254         'mojo_base.gyp:mojo_common_lib',
255         'mojo_base.gyp:mojo_environment_chromium',
256         'mojo_base.gyp:mojo_system_impl',
257         'mojo_shell_lib',
258       ],
259       'conditions': [
260         ['use_ozone==1', {
261           'dependencies': [
262             '../ui/ozone/ozone.gyp:ozone',
263           ],
264         }],
265       ],
266       'sources': [
267         'shell/desktop/mojo_main.cc',
268       ],
269     },
270     {
271       # GN version: //mojo/shell:mojo_shell_tests
272       'target_name': 'mojo_shell_tests',
273       'type': '<(gtest_target_type)',
274       'dependencies': [
275         '../base/base.gyp:base',
276         '../base/base.gyp:base_i18n',
277         '../base/base.gyp:test_support_base',
278         '../testing/gtest.gyp:gtest',
279         '../net/net.gyp:net_test_support',
280         # TODO(vtl): We don't currently need this, but I imagine we will soon.
281         # '../ui/gl/gl.gyp:gl',
282         '../url/url.gyp:url_lib',
283         'mojo_application_manager',
284         'mojo_base.gyp:mojo_common_lib',
285         'mojo_base.gyp:mojo_environment_chromium',
286         'mojo_base.gyp:mojo_system_impl',
287         'mojo_shell_lib',
288         'mojo_test_app',
289         'mojo_test_request_tracker_app',
290         'mojo_test_service_bindings',
291       ],
292       'sources': [
293         'shell/child_process_host_unittest.cc',
294         'shell/dynamic_application_loader_unittest.cc',
295         'shell/in_process_dynamic_service_runner_unittest.cc',
296         'shell/shell_test_base.cc',
297         'shell/shell_test_base.h',
298         'shell/shell_test_base_unittest.cc',
299         'shell/shell_test_main.cc',
300       ],
301       'conditions': [
302         ['OS == "android"', {
303           'dependencies': [
304             '../testing/android/native_test.gyp:native_test_native_code',
305           ],
306         }],
307       ],
308     },
309     {
310       # GN version: //mojo/application_manager
311       'target_name': 'mojo_application_manager',
312       'type': '<(component)',
313       'defines': [
314         'MOJO_APPLICATION_MANAGER_IMPLEMENTATION',
315       ],
316       'dependencies': [
317         '../base/base.gyp:base',
318         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
319         '../net/net.gyp:net',
320         '../url/url.gyp:url_lib',
321         'mojo_content_handler_bindings',
322         'mojo_network_bindings',
323         'mojo_base.gyp:mojo_application_bindings',
324         'mojo_base.gyp:mojo_common_lib',
325         'mojo_base.gyp:mojo_environment_chromium',
326         '<(mojo_system_for_component)',
327       ],
328       'sources': [
329         'application_manager/application_loader.cc',
330         'application_manager/application_loader.h',
331         'application_manager/application_manager.cc',
332         'application_manager/application_manager.h',
333         'application_manager/application_manager_export.h',
334         'application_manager/background_shell_application_loader.cc',
335         'application_manager/background_shell_application_loader.h',
336       ],
337       'export_dependent_settings': [
338         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
339         'mojo_base.gyp:mojo_application_bindings',
340         'mojo_network_bindings',
341       ],
342     },
343     {
344       # GN version: //mojo/application_manager:unittests
345       'target_name': 'mojo_application_manager_unittests',
346       'type': 'executable',
347       'dependencies': [
348         '../base/base.gyp:base',
349         '../testing/gtest.gyp:gtest',
350         '../url/url.gyp:url_lib',
351         'mojo_application_manager',
352         'mojo_base.gyp:mojo_common_lib',
353         'mojo_base.gyp:mojo_cpp_bindings',
354         'mojo_base.gyp:mojo_environment_chromium',
355         'mojo_base.gyp:mojo_run_all_unittests',
356         'mojo_base.gyp:mojo_application_chromium',
357       ],
358       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
359       'sources': [
360         'application_manager/application_manager_unittest.cc',
361         'application_manager/background_shell_application_loader_unittest.cc',
362         'application_manager/test.mojom',
363       ],
364     },
365     {
366       # GN version: //mojo/cc
367       'target_name': 'mojo_cc_support',
368       'type': 'static_library',
369       'dependencies': [
370         '../base/base.gyp:base',
371         '../cc/cc.gyp:cc',
372         '../cc/cc.gyp:cc_surfaces',
373         '../skia/skia.gyp:skia',
374         '../gpu/gpu.gyp:gles2_implementation',
375         'mojo_geometry_lib',
376         'mojo_surfaces_bindings',
377         'mojo_surfaces_lib',
378       ],
379       'includes': [
380         'mojo_public_gles2_for_loadable_module.gypi',
381       ],
382       'export_dependent_settings': [
383         'mojo_surfaces_bindings',
384       ],
385       'sources': [
386         'cc/context_provider_mojo.cc',
387         'cc/context_provider_mojo.h',
388         'cc/output_surface_mojo.cc',
389         'cc/output_surface_mojo.h',
390       ],
391     },
392   ],
393   'conditions': [
394     ['OS=="android"', {
395       'targets': [
396         {
397           'target_name': 'mojo_native_viewport_java',
398           'type': 'none',
399           'dependencies': [
400             '../base/base.gyp:base_java',
401           ],
402           'variables': {
403             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
404           },
405           'includes': [ '../build/java.gypi' ],
406         },
407         {
408           'target_name': 'libmojo_shell',
409           'type': 'shared_library',
410           'dependencies': [
411             '../base/base.gyp:base',
412             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
413             '../ui/gfx/gfx.gyp:gfx',
414             '../ui/gfx/gfx.gyp:gfx_geometry',
415             '../ui/gl/gl.gyp:gl',
416             'mojo_base.gyp:mojo_application_bindings',
417             'mojo_base.gyp:mojo_common_lib',
418             'mojo_base.gyp:mojo_environment_chromium',
419             'mojo_base.gyp:mojo_jni_headers',
420             'mojo_shell_lib',
421           ],
422           'sources': [
423             'shell/android/library_loader.cc',
424             'shell/android/mojo_main.cc',
425             'shell/android/mojo_main.h',
426           ],
427         },
428         {
429           'target_name': 'mojo_shell_apk',
430           'type': 'none',
431           'dependencies': [
432             '../base/base.gyp:base_java',
433             '../net/net.gyp:net_java',
434             'mojo_native_viewport_java',
435             'libmojo_shell',
436           ],
437           'variables': {
438             'apk_name': 'MojoShell',
439             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
440             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
441             'native_lib_target': 'libmojo_shell',
442           },
443           'includes': [ '../build/java_apk.gypi' ],
444         }
445       ],
446     }],
447     ['OS=="linux"', {
448       'targets': [
449         {
450           'target_name': 'mojo_dbus_service',
451           'type': 'static_library',
452           'dependencies': [
453             '../base/base.gyp:base',
454             '../build/linux/system.gyp:dbus',
455             '../dbus/dbus.gyp:dbus',
456             'mojo_base.gyp:mojo_application_chromium',
457             'mojo_base.gyp:mojo_common_lib',
458             'mojo_base.gyp:mojo_system_impl',
459             'mojo_external_service_bindings',
460           ],
461           'sources': [
462             'dbus/dbus_external_service.h',
463             'dbus/dbus_external_service.cc',
464           ],
465         },
466       ],
467     }],
468     ['use_aura==1', {
469       'targets': [
470         {
471           # GN version: //mojo/aura
472           'target_name': 'mojo_aura_support',
473           'type': 'static_library',
474           'dependencies': [
475             '../cc/cc.gyp:cc',
476             '../ui/aura/aura.gyp:aura',
477             '../ui/compositor/compositor.gyp:compositor',
478             '../ui/events/events.gyp:events',
479             '../ui/events/events.gyp:events_base',
480             '../ui/gl/gl.gyp:gl',
481             '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
482             'mojo_cc_support',
483             'mojo_native_viewport_bindings',
484           ],
485           'includes': [
486             'mojo_public_gles2_for_loadable_module.gypi',
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/input_method_mojo_linux.cc',
519             'views/input_method_mojo_linux.h',
520             'views/native_widget_view_manager.cc',
521             'views/native_widget_view_manager.h',
522             'views/views_init.cc',
523             'views/views_init.h',
524           ],
525         },
526         {
527           'target_name': 'mojo_views_support_internal',
528           'type': '<(component)',
529           'dependencies': [
530             '../base/base.gyp:base',
531             '../base/base.gyp:base_i18n',
532             '../base/base.gyp:base_static',
533             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
534             '../skia/skia.gyp:skia',
535             '../skia/skia.gyp:skia',
536             '../third_party/icu/icu.gyp:icui18n',
537             '../third_party/icu/icu.gyp:icuuc',
538             '../ui/base/ui_base.gyp:ui_base',
539             '../ui/gfx/gfx.gyp:gfx',
540           ],
541           'sources': [
542             'views/mojo_views_export.h',
543             'views/views_init_internal.cc',
544             'views/views_init_internal.h',
545           ],
546           'defines': [
547             'MOJO_VIEWS_IMPLEMENTATION',
548           ],
549         },
550       ],
551     }],
552     ['component!="shared_library" and OS=="linux"', {
553       'targets': [
554         {
555           'target_name': 'mojo_python_system',
556           'variables': {
557             'python_base_module': 'mojo',
558             'python_cython_module': 'system',
559           },
560           'sources': [
561             'public/python/mojo/c_core.pxd',
562             'public/python/mojo/system.pyx',
563           ],
564           'dependencies': [
565             'mojo_base.gyp:mojo_system',
566           ],
567           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
568         },
569         {
570           'target_name': 'mojo_python_embedder',
571           'type': 'loadable_module',
572           'variables': {
573             'python_base_module': 'mojo',
574             'python_cython_module': 'embedder',
575           },
576           'sources': [
577             'python/system/mojo/embedder.pyx',
578           ],
579           'dependencies': [
580             'mojo_base.gyp:mojo_system_impl',
581           ],
582           'includes': [ '../third_party/cython/cython_compiler.gypi' ],
583         },
584         {
585           'target_name': 'mojo_python',
586           'type': 'none',
587           'variables': {
588             'python_base_module': 'mojo',
589           },
590           'sources': [
591             'public/python/mojo/__init__.py',
592           ],
593           'dependencies': [
594             'mojo_python_embedder',
595             'mojo_python_system',
596           ],
597           'includes': [ '../third_party/cython/python_module.gypi' ],
598         },
599       ],
600     }],
601   ],