Add ICU message format support
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blob6b1d251fd468d330f45f6f6ecdad43e2f07b7758
1 # Copyright 2014 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.
5 # Essential components (and their tests) that are needed to build
6 # Chrome should be here.  Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
9   'includes': [
10     '../third_party/mojo/mojo_variables.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'mojo_base',
15       'type': 'none',
16       'dependencies': [
17         # NOTE: If adding a new dependency here, please consider whether it
18         # should also be added to the list of Mojo-related dependencies of
19         # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
20         # target on iOS due to the presence of the js targets, which cause v8
21         # to be built.
22         'mojo_common_lib',
23         'mojo_common_unittests',
24       ],
25       'conditions': [
26         ['OS == "android"', {
27           'dependencies': [
28             '../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
29             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
30           ],
31         }],
32       ]
33     },
34     {
35       'target_name': 'mojo_none',
36       'type': 'none',
37     },
38     {
39       # GN version: //mojo/message_pump
40       'target_name': 'mojo_message_pump_lib',
41       'type': '<(component)',
42       'defines': [
43         'MOJO_MESSAGE_PUMP_IMPLEMENTATION',
44       ],
45       'dependencies': [
46         '../base/base.gyp:base',
47         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
48         '<(mojo_system_for_component)',
49       ],
50       'export_dependent_settings': [
51         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
52       ],
53       'sources': [
54         'message_pump/handle_watcher.cc',
55         'message_pump/handle_watcher.h',
56         'message_pump/message_pump_mojo.cc',
57         'message_pump/message_pump_mojo.h',
58         'message_pump/message_pump_mojo_handler.h',
59         'message_pump/time_helper.cc',
60         'message_pump/time_helper.h',
61       ],
62     },
63     {
64       # GN version: //mojo/common
65       'target_name': 'mojo_common_lib',
66       'type': '<(component)',
67       'defines': [
68         'MOJO_COMMON_IMPLEMENTATION',
69       ],
70       'dependencies': [
71         '../base/base.gyp:base',
72         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
73         '<(mojo_system_for_component)',
74       ],
75       'export_dependent_settings': [
76         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
77       ],
78       'sources': [
79         'common/common_type_converters.cc',
80         'common/common_type_converters.h',
81         'common/data_pipe_file_utils.cc',
82         'common/data_pipe_utils.cc',
83         'common/data_pipe_utils.h',
84       ],
85     },
86     {
87       # GN version: //mojo/common:url_type_converters
88       'target_name': 'mojo_url_type_converters',
89       'type': 'static_library',
90       'dependencies': [
91         '../base/base.gyp:base',
92         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
93         '../url/url.gyp:url_lib',
94         '<(mojo_system_for_component)',
95       ],
96       'export_dependent_settings': [
97         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
98       ],
99       'sources': [
100         'common/url_type_converters.cc',
101         'common/url_type_converters.h',
102       ],
103     },
104     {
105       # GN version: //mojo/converters/geometry
106       'target_name': 'mojo_geometry_lib',
107       'type': '<(component)',
108       'defines': [
109         'MOJO_GEOMETRY_IMPLEMENTATION',
110       ],
111       'dependencies': [
112         '../ui/mojo/geometry/mojo_bindings.gyp:mojo_geometry_bindings',
113         '../ui/gfx/gfx.gyp:gfx_geometry',
114         'mojo_environment_chromium',
115         '<(mojo_system_for_component)',
116       ],
117       'sources': [
118         'converters/geometry/geometry_type_converters.cc',
119         'converters/geometry/geometry_type_converters.h',
120         'converters/geometry/mojo_geometry_export.h',
121       ],
122     },
123     {
124       # GN version: //mojo/common:mojo_common_unittests
125       'target_name': 'mojo_common_unittests',
126       'type': 'executable',
127       'dependencies': [
128         '../base/base.gyp:base',
129         '../base/base.gyp:test_support_base',
130         '../base/base.gyp:base_message_loop_tests',
131         '../testing/gtest.gyp:gtest',
132         '../url/url.gyp:url_lib',
133         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
134         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
135         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
136         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
137         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
138         'mojo_common_lib',
139         'mojo_environment_chromium',
140         'mojo_message_pump_lib',
141         'mojo_url_type_converters',
142       ],
143       'sources': [
144         'common/common_type_converters_unittest.cc',
145         'message_pump/handle_watcher_unittest.cc',
146         'message_pump/message_pump_mojo_unittest.cc',
147       ],
148     },
149     {
150       # GN version: //mojo/environment:chromium
151       'target_name': 'mojo_environment_chromium',
152       'type': 'static_library',
153       'dependencies': [
154         'mojo_environment_chromium_impl',
155         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
156       ],
157       'sources': [
158         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
159         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
160         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
161         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
162         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
163         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
164         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
165         "../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
166         'environment/environment.cc',
167       ],
168       'include_dirs': [
169         '..',
170         '../third_party/mojo/src',
171       ],
172       'direct_dependent_settings': {
173         'include_dirs': [
174           '../third_party/mojo/src',
175         ],
176       },
177       'export_dependent_settings': [
178         'mojo_environment_chromium_impl',
179       ],
180     },
181     {
182       # GN version: //mojo/environment:chromium_impl
183       'target_name': 'mojo_environment_chromium_impl',
184       'type': '<(component)',
185       'defines': [
186         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
187       ],
188       'dependencies': [
189         '../base/base.gyp:base',
190         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
191         'mojo_message_pump_lib',
192         '<(mojo_system_for_component)',
193       ],
194       'sources': [
195         'environment/default_async_waiter_impl.cc',
196         'environment/default_async_waiter_impl.h',
197         'environment/default_logger_impl.cc',
198         'environment/default_logger_impl.h',
199         'environment/default_run_loop_impl.cc',
200         'environment/default_run_loop_impl.h',
201         'environment/default_task_tracker_impl.cc',
202         'environment/default_task_tracker_impl.h',
203       ],
204       'include_dirs': [
205         '..',
206         '../third_party/mojo/src',
207       ],
208       'direct_dependent_settings': {
209         'include_dirs': [
210           '../third_party/mojo/src',
211         ],
212       },
213     },
214     {
215       'target_name': 'mojo_application_bindings_mojom',
216       'type': 'none',
217       'variables': {
218         'mojom_files': [
219           'application/public/interfaces/application.mojom',
220           'application/public/interfaces/content_handler.mojom',
221           'application/public/interfaces/service_provider.mojom',
222           'application/public/interfaces/shell.mojom',
223         ],
224       },
225       'dependencies': [
226         'mojo_services.gyp:network_service_bindings_generation',
227       ],
228       'export_dependent_settings': [
229         'mojo_services.gyp:network_service_bindings_generation',
230       ],
231       'includes': [ '../third_party/mojo/mojom_bindings_generator_explicit.gypi' ],
232     },
233     {
234       # GN version: //mojo/application/public/cpp
235       'target_name': 'mojo_application_base',
236       'type': 'static_library',
237       'sources': [
238         'application/public/cpp/app_lifetime_helper.h',
239         'application/public/cpp/application_connection.h',
240         'application/public/cpp/application_delegate.h',
241         'application/public/cpp/application_impl.h',
242         'application/public/cpp/application_runner.h',
243         'application/public/cpp/connect.h',
244         'application/public/cpp/interface_factory.h',
245         'application/public/cpp/interface_factory_impl.h',
246         'application/public/cpp/lib/app_lifetime_helper.cc',
247         'application/public/cpp/lib/application_connection.cc',
248         'application/public/cpp/lib/application_delegate.cc',
249         'application/public/cpp/lib/application_impl.cc',
250         'application/public/cpp/lib/application_runner.cc',
251         'application/public/cpp/lib/interface_factory_connector.h',
252         'application/public/cpp/lib/service_connector_registry.cc',
253         'application/public/cpp/lib/service_connector_registry.h',
254         'application/public/cpp/lib/service_provider_impl.cc',
255         'application/public/cpp/lib/service_registry.cc',
256         'application/public/cpp/lib/service_registry.h',
257         'application/public/cpp/service_connector.h',
258         'application/public/cpp/service_provider_impl.h',
259       ],
260       'dependencies': [
261         'mojo_application_bindings',
262         'mojo_message_pump_lib',
263       ],
264     },
265     {
266       # GN version: //mojo/public/interfaces/application:application
267       'target_name': 'mojo_application_bindings',
268       'type': 'static_library',
269       'dependencies': [
270         'mojo_application_bindings_mojom',
271         'mojo_services.gyp:network_service_bindings_lib',
272         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
273       ],
274       'export_dependent_settings': [
275         'mojo_services.gyp:network_service_bindings_lib',
276       ],
277     },
278     {
279       # GN version: //mojo/test:test_support
280       'target_name': 'mojo_test_support',
281       'type': 'static_library',
282       'dependencies': [
283         '../base/base.gyp:base',
284       ],
285       'sources': [
286         'test/test_utils.h',
287         'test/test_utils_posix.cc',
288         'test/test_utils_win.cc',
289       ],
290     },
291     {
292       # GN version: //mojo/application/public/cpp/tests
293       'target_name': 'mojo_public_application_unittests',
294       'type': 'executable',
295       'dependencies': [
296         'mojo_application_base',
297         '../base/base.gyp:base',
298         '../testing/gtest.gyp:gtest',
299         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
300         '../third_party/mojo/mojo_public.gyp:mojo_utility',
301         '../third_party/mojo/mojo_public.gyp:mojo_environment_standalone',
302       ],
303       'sources': [
304         'application/public/cpp/tests/service_registry_unittest.cc',
305       ],
306     },
307   ],
308   'conditions': [
309     ['OS=="android"', {
310       'targets': [
311         {
312           'target_name': 'mojo_jni_headers',
313           'type': 'none',
314           'dependencies': [
315             'mojo_java_set_jni_headers',
316           ],
317           'sources': [
318             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
319             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
320             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
321           ],
322           'variables': {
323             'jni_gen_package': 'mojo',
324           },
325           'includes': [ '../build/jni_generator.gypi' ],
326         },
327         {
328           'target_name': 'libmojo_system_java',
329           'type': 'static_library',
330           'dependencies': [
331             '../base/base.gyp:base',
332             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
333             'mojo_common_lib',
334             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
335             'mojo_environment_chromium',
336             'mojo_jni_headers',
337           ],
338           'sources': [
339             'android/system/core_impl.cc',
340             'android/system/core_impl.h',
341           ],
342         },
343         {
344           'target_name': 'mojo_java_set_jni_headers',
345           'type': 'none',
346           'variables': {
347             'jni_gen_package': 'mojo',
348             'input_java_class': 'java/util/HashSet.class',
349           },
350           'includes': [ '../build/jar_file_jni_generator.gypi' ],
351         },
352         {
353           'target_name': 'mojo_system_java',
354           'type': 'none',
355           'dependencies': [
356             '../base/base.gyp:base_java',
357             'libmojo_system_java',
358             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
359           ],
360           'variables': {
361             'java_in_dir': '<(DEPTH)/mojo/android/system',
362           },
363           'includes': [ '../build/java.gypi' ],
364         },
365       ],
366     }],
367     ['test_isolation_mode != "noop"', {
368       'targets': [
369         {
370           'target_name': 'mojo_common_unittests_run',
371           'type': 'none',
372           'dependencies': [
373             'mojo_common_unittests',
374           ],
375           'includes': [
376             '../build/isolate.gypi',
377           ],
378           'sources': [
379             'mojo_common_unittests.isolate',
380           ],
381         },
382       ],
383     }],
384   ]