[Android] Fix for overzealous partner bookmarks shim.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob515cfe100c4988f3ffa564f1f4c3cdbd0b179727
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   'variables': {
7     'chromium_code': 1,
8   },
9   'target_defaults': {
10     'defines': ['MOJO_IMPLEMENTATION'],
11   },
12   'targets': [
13     {
14       'target_name': 'mojo',
15       'type': 'none',
16       'dependencies': [
17         'mojo_public_test_support',
18         'mojo_public_unittests',
19         'mojo_public_perftests',
20         'mojo_system',
21         'mojo_system_unittests',
22       ],
23     },
24     {
25       'target_name': 'mojo_public_test_support',
26       'type': 'static_library',
27       'dependencies': [
28         '../base/base.gyp:base',
29         '../testing/gtest.gyp:gtest',
30         'mojo_system',
31       ],
32       'sources': [
33         'public/tests/test_support.cc',
34         'public/tests/test_support.h',
35       ],
36     },
37     {
38       'target_name': 'mojo_public_unittests',
39       'type': 'executable',
40       'dependencies': [
41         '../base/base.gyp:run_all_unittests',
42         '../testing/gtest.gyp:gtest',
43         'mojo_public_test_support',
44         'mojo_system',
45       ],
46       'sources': [
47         'public/tests/system_core_unittest.cc',
48       ],
49     },
50     {
51       'target_name': 'mojo_public_perftests',
52       'type': 'executable',
53       'dependencies': [
54         '../base/base.gyp:base',
55         '../base/base.gyp:test_support_perf',
56         '../testing/gtest.gyp:gtest',
57         'mojo_public_test_support',
58         'mojo_system',
59       ],
60       'sources': [
61         'public/tests/system_core_perftest.cc',
62       ],
63     },
64     {
65       'target_name': 'mojo_system',
66       'type': '<(component)',
67       'dependencies': [
68         '../base/base.gyp:base',
69       ],
70       'defines': [
71         'MOJO_SYSTEM_IMPLEMENTATION',
72       ],
73       'sources': [
74         'system/core.cc',
75         'system/core_impl.cc',
76         'system/core_impl.h',
77         'system/dispatcher.cc',
78         'system/dispatcher.h',
79         'system/limits.h',
80         'system/local_message_pipe_endpoint.cc',
81         'system/local_message_pipe_endpoint.h',
82         'system/memory.cc',
83         'system/memory.h',
84         'system/message_in_transit.cc',
85         'system/message_in_transit.h',
86         'system/message_pipe.cc',
87         'system/message_pipe.h',
88         'system/message_pipe_dispatcher.cc',
89         'system/message_pipe_dispatcher.h',
90         'system/message_pipe_endpoint.cc',
91         'system/message_pipe_endpoint.h',
92         'system/platform_channel_handle.h',
93         'system/raw_channel.h',
94         'system/raw_channel_posix.cc',
95         'system/simple_dispatcher.cc',
96         'system/simple_dispatcher.h',
97         'system/waiter.cc',
98         'system/waiter.h',
99         'system/waiter_list.cc',
100         'system/waiter_list.h',
101       ],
102       'direct_dependent_settings': {
103         'include_dirs': [
104           '..',
105         ],
106       },
107     },
108     {
109       'target_name': 'mojo_system_unittests',
110       'type': 'executable',
111       'dependencies': [
112         '../base/base.gyp:run_all_unittests',
113         '../testing/gtest.gyp:gtest',
114         'mojo_system',
115       ],
116       'sources': [
117         'system/core_impl_unittest.cc',
118         'system/core_test_base.cc',
119         'system/core_test_base.h',
120         'system/dispatcher_unittest.cc',
121         'system/message_pipe_dispatcher_unittest.cc',
122         'system/message_pipe_unittest.cc',
123         'system/raw_channel_posix_unittest.cc',
124         'system/simple_dispatcher_unittest.cc',
125         'system/test_utils.cc',
126         'system/test_utils.h',
127         'system/waiter_list_unittest.cc',
128         'system/waiter_test_utils.cc',
129         'system/waiter_test_utils.h',
130         'system/waiter_unittest.cc',
131       ],
132     },
133     {
134       'target_name': 'mojo_shell_lib',
135       'type': 'static_library',
136       'dependencies': [
137         '../base/base.gyp:base',
138         '../net/net.gyp:net',
139         '../url/url.gyp:url_lib',
140         'mojo_system',
141         'native_viewport',
142       ],
143       'sources': [
144         'shell/app_container.cc',
145         'shell/app_container.h',
146         'shell/context.cc',
147         'shell/context.h',
148         'shell/loader.cc',
149         'shell/loader.h',
150         'shell/network_delegate.cc',
151         'shell/network_delegate.h',
152         'shell/run.cc',
153         'shell/run.h',
154         'shell/storage.cc',
155         'shell/storage.h',
156         'shell/switches.cc',
157         'shell/switches.h',
158         'shell/task_runners.cc',
159         'shell/task_runners.h',
160         'shell/url_request_context_getter.cc',
161         'shell/url_request_context_getter.h',
162       ],
163       'conditions': [
164         ['OS == "win"', {
165           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
166           'msvs_disabled_warnings': [
167             4267,
168           ],
169         }],
170       ],
171     },
172     {
173       'target_name': 'mojo_shell',
174       'type': 'executable',
175       'dependencies': [
176         '../base/base.gyp:base',
177         '../url/url.gyp:url_lib',
178         'mojo_shell_lib',
179         'mojo_system',
180       ],
181       'sources': [
182         'shell/desktop/mojo_main.cc',
183       ],
184       'conditions': [
185         ['OS == "win"', {
186           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
187           'msvs_disabled_warnings': [
188             4267,
189           ],
190         }],
191       ],
192     },
193     {
194       'target_name': 'sample_app',
195       'type': 'shared_library',
196       'dependencies': [
197         'mojo_system',
198       ],
199       'sources': [
200         'examples/sample_app/sample_app.cc',
201       ],
202     },
203     {
204       'target_name': 'mojo_bindings',
205       'type': 'static_library',
206       'include_dirs': [
207         '..'
208       ],
209       'sources': [
210         'public/bindings/lib/bindings.h',
211         'public/bindings/lib/bindings_internal.h',
212         'public/bindings/lib/bindings_serialization.cc',
213         'public/bindings/lib/bindings_serialization.h',
214         'public/bindings/lib/buffer.cc',
215         'public/bindings/lib/buffer.h',
216         'public/bindings/lib/message.cc',
217         'public/bindings/lib/message.h',
218         'public/bindings/lib/message_builder.cc',
219         'public/bindings/lib/message_builder.h',
220       ],
221     },
222     {
223       'target_name': 'mojo_bindings_test',
224       'type': 'executable',
225       'include_dirs': [
226         '..'
227       ],
228       'dependencies': [
229         'mojo_bindings',
230       ],
231       'sources': [
232         'public/bindings/sample/generated/sample_bar.cc',
233         'public/bindings/sample/generated/sample_bar.h',
234         'public/bindings/sample/generated/sample_bar_serialization.cc',
235         'public/bindings/sample/generated/sample_bar_serialization.h',
236         'public/bindings/sample/generated/sample_foo.cc',
237         'public/bindings/sample/generated/sample_foo.h',
238         'public/bindings/sample/generated/sample_foo_serialization.cc',
239         'public/bindings/sample/generated/sample_foo_serialization.h',
240         'public/bindings/sample/generated/sample_service.h',
241         'public/bindings/sample/generated/sample_service_proxy.cc',
242         'public/bindings/sample/generated/sample_service_serialization.cc',
243         'public/bindings/sample/generated/sample_service_serialization.h',
244         'public/bindings/sample/generated/sample_service_stub.cc',
245         'public/bindings/sample/sample_test.cc',
246       ],
247     },
248     {
249       'target_name': 'native_viewport',
250       'type': 'static_library',
251       'dependencies': [
252         '../base/base.gyp:base',
253         '../ui/gfx/gfx.gyp:gfx',
254         '../ui/events/events.gyp:events'
255       ],
256       'sources': [
257         'services/native_viewport/native_viewport.h',
258         'services/native_viewport/native_viewport_android.cc',
259         'services/native_viewport/native_viewport_controller.cc',
260         'services/native_viewport/native_viewport_controller.h',
261         'services/native_viewport/native_viewport_stub.cc',
262         'services/native_viewport/native_viewport_win.cc',
263         'services/native_viewport/native_viewport_x11.cc',
264       ],
265       'conditions': [
266         ['OS=="win" or OS=="android" or OS=="linux"', {
267           'sources!': [
268             'services/native_viewport/native_viewport_stub.cc',
269           ],
270         }]
271       ],
272     },
273   ],
274   'conditions': [
275     ['OS=="android"', {
276       'targets': [
277         {
278           'target_name': 'java_set_jni_headers',
279           'type': 'none',
280           'variables': {
281             'jni_gen_package': 'mojo',
282             'input_java_class': 'java/util/HashSet.class',
283           },
284           'includes': [ '../build/jar_file_jni_generator.gypi' ],
285         },
286         {
287           'target_name': 'mojo_jni_headers',
288           'type': 'none',
289           'dependencies': [
290             'java_set_jni_headers',
291           ],
292           'direct_dependent_settings': {
293             'include_dirs': [
294               '<(SHARED_INTERMEDIATE_DIR)/mojo',
295             ],
296           },
297           'sources': [
298             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
299             'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoView.java',
300           ],
301           'variables': {
302             'jni_gen_package': 'mojo'
303           },
304           'includes': [ '../build/jni_generator.gypi' ],
305         },
306         {
307           'target_name': 'libmojo_shell',
308           'type': 'shared_library',
309           'dependencies': [
310             '../base/base.gyp:base',
311             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
312             '../ui/gfx/gfx.gyp:gfx',
313             '../ui/gl/gl.gyp:gl',
314             'mojo_jni_headers',
315             'mojo_shell_lib',
316           ],
317           'sources': [
318             'shell/android/library_loader.cc',
319             'shell/android/mojo_main.cc',
320             'shell/android/mojo_main.h',
321             'shell/android/mojo_view.cc',
322             'shell/android/mojo_view.h',
323           ],
324         },
325         {
326           'target_name': 'mojo_shell_apk',
327           'type': 'none',
328           'dependencies': [
329             '../base/base.gyp:base_java',
330             '../net/net.gyp:net_java',
331             'libmojo_shell',
332           ],
333           'variables': {
334             'apk_name': 'MojoShell',
335             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
336             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
337             'native_lib_target': 'libmojo_shell',
338           },
339           'includes': [ '../build/java_apk.gypi' ],
340         }
341       ],
342     }],
343   ],