Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / mojo / mojo.gyp
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.
4
5 {
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   'variables': {
17     'chromium_code': 1,
18     'mojo_shell_debug_url%': "",
19   },
20   'includes': [
21     'mojo_apps.gypi',
22     'mojo_examples.gypi',
23     'mojo_public.gypi',
24     'mojo_services.gypi',
25   ],
26   'targets': [
27     {
28       'target_name': 'mojo',
29       'type': 'none',
30       'dependencies': [
31         'mojo_bindings',
32         'mojo_compositor_app',
33         'mojo_common_lib',
34         'mojo_common_unittests',
35         'mojo_js',
36         'mojo_js_unittests',
37         'mojo_public_test_utils',
38         'mojo_public_bindings_unittests',
39         'mojo_public_environment_unittests',
40         'mojo_public_system_perftests',
41         'mojo_public_system_unittests',
42         'mojo_public_utility_unittests',
43         'mojo_sample_app',
44         'mojo_shell',
45         'mojo_shell_lib',
46         'mojo_shell_unittests',
47         'mojo_system',
48         'mojo_system_impl',
49         'mojo_system_unittests',
50         'mojo_utility',
51       ],
52       'conditions': [
53         ['use_aura==1', {
54           'dependencies': [
55             'mojo_aura_demo',
56             'mojo_launcher',
57             'mojo_view_manager',
58           ],
59         }],
60       ]
61     },
62     {
63       'target_name': 'mojo_run_all_unittests',
64       'type': 'static_library',
65       'dependencies': [
66         '../base/base.gyp:base',
67         '../base/base.gyp:test_support_base',
68         '../testing/gtest.gyp:gtest',
69         'mojo_system',
70         'mojo_system_impl',
71         'mojo_test_support',
72         'mojo_test_support_impl',
73       ],
74       'sources': [
75         'common/test/run_all_unittests.cc',
76       ],
77     },
78     {
79       'target_name': 'mojo_run_all_perftests',
80       'type': 'static_library',
81       'dependencies': [
82         '../base/base.gyp:test_support_base',
83         'mojo_system',
84         'mojo_system_impl',
85         'mojo_test_support',
86         'mojo_test_support_impl',
87       ],
88       'sources': [
89         'common/test/run_all_perftests.cc',
90       ],
91     },
92     {
93       'target_name': 'mojo_system_impl',
94       'type': '<(component)',
95       'dependencies': [
96         'mojo_system',
97         '../base/base.gyp:base',
98       ],
99       'defines': [
100         'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
101       ],
102       'sources': [
103         'system/channel.cc',
104         'system/channel.h',
105         'system/constants.h',
106         'system/core_impl.cc',
107         'system/core_impl.h',
108         'system/data_pipe.cc',
109         'system/data_pipe.h',
110         'system/data_pipe_consumer_dispatcher.cc',
111         'system/data_pipe_consumer_dispatcher.h',
112         'system/data_pipe_producer_dispatcher.cc',
113         'system/data_pipe_producer_dispatcher.h',
114         'system/dispatcher.cc',
115         'system/dispatcher.h',
116         'system/embedder/embedder.cc',
117         'system/embedder/embedder.h',
118         'system/embedder/platform_channel_pair.cc',
119         'system/embedder/platform_channel_pair.h',
120         'system/embedder/platform_channel_pair_posix.cc',
121         'system/embedder/platform_channel_pair_win.cc',
122         'system/embedder/platform_handle.cc',
123         'system/embedder/platform_handle.h',
124         'system/embedder/scoped_platform_handle.h',
125         'system/local_data_pipe.cc',
126         'system/local_data_pipe.h',
127         'system/local_message_pipe_endpoint.cc',
128         'system/local_message_pipe_endpoint.h',
129         'system/memory.cc',
130         'system/memory.h',
131         'system/message_in_transit.cc',
132         'system/message_in_transit.h',
133         'system/message_pipe.cc',
134         'system/message_pipe.h',
135         'system/message_pipe_dispatcher.cc',
136         'system/message_pipe_dispatcher.h',
137         'system/message_pipe_endpoint.cc',
138         'system/message_pipe_endpoint.h',
139         'system/proxy_message_pipe_endpoint.cc',
140         'system/proxy_message_pipe_endpoint.h',
141         'system/raw_channel.h',
142         'system/raw_channel_posix.cc',
143         'system/raw_channel_win.cc',
144         'system/simple_dispatcher.cc',
145         'system/simple_dispatcher.h',
146         'system/waiter.cc',
147         'system/waiter.h',
148         'system/waiter_list.cc',
149         'system/waiter_list.h',
150         # Test-only code:
151         # TODO(vtl): It's a little unfortunate that these end up in the same
152         # component as non-test-only code. In the static build, this code should
153         # hopefully be dead-stripped.
154         'system/embedder/test_embedder.cc',
155         'system/embedder/test_embedder.h',
156       ],
157     },
158     {
159       'target_name': 'mojo_system_unittests',
160       'type': 'executable',
161       'dependencies': [
162         '../base/base.gyp:run_all_unittests',
163         '../testing/gtest.gyp:gtest',
164         'mojo_common_test_support',
165         'mojo_system',
166         'mojo_system_impl',
167       ],
168       'sources': [
169         'system/core_impl_unittest.cc',
170         'system/core_test_base.cc',
171         'system/core_test_base.h',
172         'system/data_pipe_unittest.cc',
173         'system/dispatcher_unittest.cc',
174         'system/embedder/embedder_unittest.cc',
175         'system/local_data_pipe_unittest.cc',
176         'system/message_pipe_dispatcher_unittest.cc',
177         'system/message_pipe_unittest.cc',
178         'system/multiprocess_message_pipe_unittest.cc',
179         'system/raw_channel_posix_unittest.cc',
180         'system/remote_message_pipe_posix_unittest.cc',
181         'system/simple_dispatcher_unittest.cc',
182         'system/test_utils.cc',
183         'system/test_utils.h',
184         'system/waiter_list_unittest.cc',
185         'system/waiter_test_utils.cc',
186         'system/waiter_test_utils.h',
187         'system/waiter_unittest.cc',
188       ],
189     },
190     {
191       'target_name': 'mojo_gles2_impl',
192       'type': '<(component)',
193       'dependencies': [
194         '../base/base.gyp:base',
195         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
196         '../gpu/gpu.gyp:command_buffer_client',
197         '../gpu/gpu.gyp:command_buffer_common',
198         '../gpu/gpu.gyp:gles2_cmd_helper',
199         '../gpu/gpu.gyp:gles2_implementation',
200         'mojo_gles2',
201         'mojo_gles2_bindings',
202         'mojo_environment_chromium',
203       ],
204       'defines': [
205         'MOJO_GLES2_IMPL_IMPLEMENTATION',
206       ],
207       'sources': [
208         'gles2/command_buffer_client_impl.cc',
209         'gles2/command_buffer_client_impl.h',
210         'gles2/gles2_impl_export.h',
211         'gles2/gles2_support_impl.cc',
212         'gles2/gles2_support_impl.h',
213         'gles2/gles2_context.cc',
214         'gles2/gles2_context.h',
215       ],
216     },
217     {
218       'target_name': 'mojo_test_support_impl',
219       'type': 'static_library',
220       'dependencies': [
221         '../base/base.gyp:base',
222       ],
223       'sources': [
224         'common/test/test_support_impl.cc',
225         'common/test/test_support_impl.h',
226       ],
227     },
228     {
229       'target_name': 'mojo_common_lib',
230       'type': '<(component)',
231       'defines': [
232         'MOJO_COMMON_IMPLEMENTATION',
233       ],
234       'dependencies': [
235         '../base/base.gyp:base',
236         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
237         'mojo_system',
238       ],
239       'sources': [
240         'common/common_type_converters.cc',
241         'common/common_type_converters.h',
242         'common/handle_watcher.cc',
243         'common/handle_watcher.h',
244         'common/message_pump_mojo.cc',
245         'common/message_pump_mojo.h',
246         'common/message_pump_mojo_handler.h',
247       ],
248     },
249     {
250       'target_name': 'mojo_common_test_support',
251       'type': 'static_library',
252       'dependencies': [
253         '../base/base.gyp:base',
254         '../base/base.gyp:test_support_base',
255         '../testing/gtest.gyp:gtest',
256         'mojo_system',
257         'mojo_system_impl',
258       ],
259       'sources': [
260         'common/test/multiprocess_test_base.cc',
261         'common/test/multiprocess_test_base.h',
262       ],
263     },
264     {
265       'target_name': 'mojo_common_unittests',
266       'type': 'executable',
267       'dependencies': [
268         '../base/base.gyp:base',
269         '../base/base.gyp:base_message_loop_tests',
270         '../testing/gtest.gyp:gtest',
271         'mojo_bindings',
272         'mojo_environment_chromium',
273         'mojo_common_lib',
274         'mojo_common_test_support',
275         'mojo_public_test_utils',
276         'mojo_run_all_unittests',
277         'mojo_system',
278         'mojo_system_impl',
279       ],
280       'sources': [
281         'common/common_type_converters_unittest.cc',
282         'common/handle_watcher_unittest.cc',
283         'common/message_pump_mojo_unittest.cc',
284         'common/test/multiprocess_test_base_unittest.cc',
285       ],
286     },
287     {
288       'target_name': 'mojo_environment_chromium',
289       'type': 'static_library',
290       'dependencies': [
291         'mojo_environment_chromium_impl',
292       ],
293       'sources': [
294         'environment/default_async_waiter.cc',
295         'environment/buffer_tls.cc',
296         'environment/environment.cc',
297       ],
298       'include_dirs': [
299         '..',
300       ],
301       'export_dependent_settings': [
302         'mojo_environment_chromium_impl',
303       ],
304     },
305     {
306       'target_name': 'mojo_environment_chromium_impl',
307       'type': '<(component)',
308       'defines': [
309         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
310       ],
311       'dependencies': [
312         '../base/base.gyp:base',
313         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
314         'mojo_common_lib'
315       ],
316       'sources': [
317         'environment/default_async_waiter_impl.cc',
318         'environment/default_async_waiter_impl.h',
319         'environment/buffer_tls_impl.cc',
320         'environment/buffer_tls_impl.h',
321       ],
322       'include_dirs': [
323         '..',
324       ],
325     },
326     {
327       'target_name': 'mojo_shell_lib',
328       'type': 'static_library',
329       'dependencies': [
330         '../base/base.gyp:base',
331         '../net/net.gyp:net',
332         '../url/url.gyp:url_lib',
333         'mojo_gles2_impl',
334         'mojo_shell_bindings',
335         'mojo_system',
336         'mojo_system_impl',
337         'mojo_native_viewport_service',
338       ],
339       'sources': [
340         'shell/context.cc',
341         'shell/context.h',
342         'shell/dynamic_service_loader.cc',
343         'shell/dynamic_service_loader.h',
344         'shell/init.cc',
345         'shell/init.h',
346         'shell/keep_alive.cc',
347         'shell/keep_alive.h',
348         'shell/loader.cc',
349         'shell/loader.h',
350         'shell/network_delegate.cc',
351         'shell/network_delegate.h',
352         'shell/run.cc',
353         'shell/run.h',
354         'shell/service_manager.cc',
355         'shell/service_manager.h',
356         'shell/storage.cc',
357         'shell/storage.h',
358         'shell/switches.cc',
359         'shell/switches.h',
360         'shell/task_runners.cc',
361         'shell/task_runners.h',
362         'shell/url_request_context_getter.cc',
363         'shell/url_request_context_getter.h',
364       ],
365     },
366     {
367       'target_name': 'mojo_shell',
368       'type': 'executable',
369       'dependencies': [
370         '../base/base.gyp:base',
371         '../ui/gl/gl.gyp:gl',
372         '../url/url.gyp:url_lib',
373         'mojo_common_lib',
374         'mojo_environment_chromium',
375         'mojo_shell_bindings',
376         'mojo_shell_lib',
377         'mojo_system',
378         'mojo_system_impl',
379       ],
380       'sources': [
381         'shell/desktop/mojo_main.cc',
382       ],
383     },
384     {
385       'target_name': 'mojo_shell_unittests',
386       'type': 'executable',
387       'dependencies': [
388         '../base/base.gyp:base',
389         '../testing/gtest.gyp:gtest',
390         'mojo_environment_standalone',
391         'mojo_run_all_unittests',
392         'mojo_utility',
393         'mojo_shell_lib',
394       ],
395       'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
396       'sources': [
397         'shell/service_manager_unittest.cc',
398         'shell/test.mojom',
399       ],
400     },
401   ],
402   'conditions': [
403     ['OS=="android"', {
404       'targets': [
405         {
406           'target_name': 'mojo_native_viewport_java',
407           'type': 'none',
408           'dependencies': [
409             '../base/base.gyp:base_java',
410           ],
411           'variables': {
412             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
413           },
414           'includes': [ '../build/java.gypi' ],
415         },
416         {
417           'target_name': 'mojo_java_set_jni_headers',
418           'type': 'none',
419           'variables': {
420             'jni_gen_package': 'mojo',
421             'jni_generator_ptr_type': 'long',
422             'input_java_class': 'java/util/HashSet.class',
423           },
424           'includes': [ '../build/jar_file_jni_generator.gypi' ],
425         },
426         {
427           'target_name': 'mojo_jni_headers',
428           'type': 'none',
429           'dependencies': [
430             'mojo_java_set_jni_headers',
431           ],
432           'sources': [
433             'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java',
434             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
435           ],
436           'variables': {
437             'jni_gen_package': 'mojo',
438             'jni_generator_ptr_type': 'long',
439          },
440           'includes': [ '../build/jni_generator.gypi' ],
441         },
442         {
443           'target_name': 'libmojo_shell',
444           'type': 'shared_library',
445           'dependencies': [
446             '../base/base.gyp:base',
447             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
448             '../ui/gfx/gfx.gyp:gfx',
449             '../ui/gfx/gfx.gyp:gfx_geometry',
450             '../ui/gl/gl.gyp:gl',
451             'mojo_common_lib',
452             'mojo_environment_chromium',
453             'mojo_jni_headers',
454             'mojo_shell_bindings',
455             'mojo_shell_lib',
456           ],
457           'sources': [
458             'shell/android/library_loader.cc',
459             'shell/android/mojo_main.cc',
460             'shell/android/mojo_main.h',
461           ],
462         },
463         {
464           'target_name': 'mojo_shell_apk',
465           'type': 'none',
466           'dependencies': [
467             '../base/base.gyp:base_java',
468             '../net/net.gyp:net_java',
469             'mojo_native_viewport_java',
470             'libmojo_shell',
471           ],
472           'variables': {
473             'apk_name': 'MojoShell',
474             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
475             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
476             'native_lib_target': 'libmojo_shell',
477           },
478           'includes': [ '../build/java_apk.gypi' ],
479         }
480       ],
481     }],
482   ],
483 }