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