Add ICU message format support
[chromium-blink-merge.git] / third_party / mojo / mojo_public.gyp
blob3f16424416c48c6f471e728cce0b59f5ef14d3ff
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.
6   'includes': [
7     'mojo_variables.gypi',
8   ],
9   'target_defaults' : {
10     'include_dirs': [
11       'src',
12     ],
13     'direct_dependent_settings': {
14       'include_dirs': [
15         'src',
16       ],
17     },
18   },
19   'targets': [
20     {
21       'target_name': 'mojo_public',
22       'type': 'none',
23       'dependencies': [
24         'mojo_js_bindings',
25         'mojo_public_test_interfaces',
26         'mojo_public_test_utils',
27         'mojo_system',
28         'mojo_utility',
29       ],
30     },
31     {
32       # Targets that (a) need to obtain the settings that mojo_system passes on
33       # to its direct dependents but (b) are not themselves in a position to
34       # hardcode a dependency to mojo_system vs. mojo_system_impl (e.g.,
35       # because they are components) should depend on this target.
36       'target_name': 'mojo_system_placeholder',
37       'type': 'none',
38     },
39     {
40       'target_name': 'mojo_system',
41       'type': 'static_library',
42       'defines': [
43         'MOJO_SYSTEM_IMPLEMENTATION',
44       ],
45       'all_dependent_settings': {
46         'conditions': [
47           # We need to be able to call the MojoSetSystemThunks() function in
48           # system_thunks.cc
49           ['OS=="android"', {
50             'ldflags!': [
51               '-Wl,--exclude-libs=ALL',
52             ],
53           }],
54         ],
55       },
56       'sources': [
57         'src/mojo/public/platform/native/system_thunks.cc',
58         'src/mojo/public/platform/native/system_thunks.h',
59       ],
60       'dependencies': [
61         'mojo_system_headers',
62       ],
63     },
64     {
65       # GN version: //mojo/public/c/system
66       'target_name': 'mojo_system_headers',
67       'type': 'none',
68       'sources': [
69         'src/mojo/public/c/system/buffer.h',
70         'src/mojo/public/c/system/core.h',
71         'src/mojo/public/c/system/data_pipe.h',
72         'src/mojo/public/c/system/functions.h',
73         'src/mojo/public/c/system/macros.h',
74         'src/mojo/public/c/system/message_pipe.h',
75         'src/mojo/public/c/system/system_export.h',
76         'src/mojo/public/c/system/types.h',
77       ],
78     },
79     {
80       # GN version: //mojo/public/cpp/system
81       'target_name': 'mojo_system_cpp_headers',
82       'type': 'none',
83       'sources': [
84         'src/mojo/public/cpp/system/buffer.h',
85         'src/mojo/public/cpp/system/core.h',
86         'src/mojo/public/cpp/system/data_pipe.h',
87         'src/mojo/public/cpp/system/functions.h',
88         'src/mojo/public/cpp/system/handle.h',
89         'src/mojo/public/cpp/system/macros.h',
90         'src/mojo/public/cpp/system/message_pipe.h',
91       ],
92       'dependencies': [
93         'mojo_system_headers',
94       ],
95     },
96     {
97       # GN version: //mojo/public/cpp/bindings
98       'target_name': 'mojo_cpp_bindings',
99       'type': 'static_library',
100       'include_dirs': [
101         '../..'
102       ],
103       'sources': [
104         'src/mojo/public/cpp/bindings/array.h',
105         'src/mojo/public/cpp/bindings/binding.h',
106         'src/mojo/public/cpp/bindings/callback.h',
107         'src/mojo/public/cpp/bindings/error_handler.h',
108         'src/mojo/public/cpp/bindings/interface_impl.h',
109         'src/mojo/public/cpp/bindings/interface_ptr.h',
110         'src/mojo/public/cpp/bindings/interface_request.h',
111         'src/mojo/public/cpp/bindings/message.h',
112         'src/mojo/public/cpp/bindings/message_filter.h',
113         'src/mojo/public/cpp/bindings/no_interface.h',
114         'src/mojo/public/cpp/bindings/string.h',
115         'src/mojo/public/cpp/bindings/strong_binding.h',
116         'src/mojo/public/cpp/bindings/type_converter.h',
117         'src/mojo/public/cpp/bindings/lib/array_internal.h',
118         'src/mojo/public/cpp/bindings/lib/array_internal.cc',
119         'src/mojo/public/cpp/bindings/lib/array_serialization.h',
120         'src/mojo/public/cpp/bindings/lib/bindings_internal.h',
121         'src/mojo/public/cpp/bindings/lib/bindings_serialization.cc',
122         'src/mojo/public/cpp/bindings/lib/bindings_serialization.h',
123         'src/mojo/public/cpp/bindings/lib/bounds_checker.cc',
124         'src/mojo/public/cpp/bindings/lib/bounds_checker.h',
125         'src/mojo/public/cpp/bindings/lib/buffer.h',
126         'src/mojo/public/cpp/bindings/lib/callback_internal.h',
127         'src/mojo/public/cpp/bindings/lib/connector.cc',
128         'src/mojo/public/cpp/bindings/lib/connector.h',
129         'src/mojo/public/cpp/bindings/lib/control_message_handler.cc',
130         'src/mojo/public/cpp/bindings/lib/control_message_handler.h',
131         'src/mojo/public/cpp/bindings/lib/control_message_proxy.cc',
132         'src/mojo/public/cpp/bindings/lib/control_message_proxy.h',
133         'src/mojo/public/cpp/bindings/lib/filter_chain.cc',
134         'src/mojo/public/cpp/bindings/lib/filter_chain.h',
135         'src/mojo/public/cpp/bindings/lib/fixed_buffer.cc',
136         'src/mojo/public/cpp/bindings/lib/fixed_buffer.h',
137         'src/mojo/public/cpp/bindings/lib/interface_ptr_internal.h',
138         'src/mojo/public/cpp/bindings/lib/map_data_internal.h',
139         'src/mojo/public/cpp/bindings/lib/map_internal.h',
140         'src/mojo/public/cpp/bindings/lib/map_serialization.h',
141         'src/mojo/public/cpp/bindings/lib/message.cc',
142         'src/mojo/public/cpp/bindings/lib/message_builder.cc',
143         'src/mojo/public/cpp/bindings/lib/message_builder.h',
144         'src/mojo/public/cpp/bindings/lib/message_filter.cc',
145         'src/mojo/public/cpp/bindings/lib/message_header_validator.cc',
146         'src/mojo/public/cpp/bindings/lib/message_header_validator.h',
147         'src/mojo/public/cpp/bindings/lib/message_internal.h',
148         'src/mojo/public/cpp/bindings/lib/message_queue.cc',
149         'src/mojo/public/cpp/bindings/lib/message_queue.h',
150         'src/mojo/public/cpp/bindings/lib/no_interface.cc',
151         'src/mojo/public/cpp/bindings/lib/router.cc',
152         'src/mojo/public/cpp/bindings/lib/router.h',
153         'src/mojo/public/cpp/bindings/lib/shared_data.h',
154         'src/mojo/public/cpp/bindings/lib/shared_ptr.h',
155         'src/mojo/public/cpp/bindings/lib/string_serialization.h',
156         'src/mojo/public/cpp/bindings/lib/string_serialization.cc',
157         'src/mojo/public/cpp/bindings/lib/validate_params.h',
158         'src/mojo/public/cpp/bindings/lib/validation_errors.cc',
159         'src/mojo/public/cpp/bindings/lib/validation_errors.h',
160         'src/mojo/public/cpp/bindings/lib/validation_util.cc',
161         'src/mojo/public/cpp/bindings/lib/validation_util.h',
162         # This comes from the mojo_interface_bindings_cpp_sources dependency.
163         '>@(mojom_generated_sources)',
164       ],
165       'dependencies': [
166         'mojo_interface_bindings_cpp_sources',
167       ],
168     },
169     {
170       # GN version: //mojo/public/js
171       'target_name': 'mojo_js_bindings',
172       'type': 'static_library',
173       'include_dirs': [
174         '../..'
175       ],
176       'sources': [
177         'src/mojo/public/js/constants.cc',
178         'src/mojo/public/js/constants.h',
179       ],
180     },
181     {
182       # GN version: //mojo/public/cpp/environment:standalone
183       'target_name': 'mojo_environment_standalone',
184       'type': 'static_library',
185       'sources': [
186         'src/mojo/public/c/environment/async_waiter.h',
187         'src/mojo/public/c/environment/logger.h',
188         'src/mojo/public/cpp/environment/async_waiter.h',
189         'src/mojo/public/cpp/environment/environment.h',
190         'src/mojo/public/cpp/environment/lib/async_waiter.cc',
191         'src/mojo/public/cpp/environment/lib/default_async_waiter.cc',
192         'src/mojo/public/cpp/environment/lib/default_async_waiter.h',
193         'src/mojo/public/cpp/environment/lib/default_logger.cc',
194         'src/mojo/public/cpp/environment/lib/default_logger.h',
195         'src/mojo/public/cpp/environment/lib/default_task_tracker.cc',
196         'src/mojo/public/cpp/environment/lib/default_task_tracker.h',
197         'src/mojo/public/cpp/environment/lib/environment.cc',
198         'src/mojo/public/cpp/environment/lib/logging.cc',
199         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc',
200         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.h',
201         'src/mojo/public/cpp/environment/logging.h',
202         'src/mojo/public/cpp/environment/task_tracker.h',
203       ],
204       'include_dirs': [
205         '../..',
206       ],
207     },
208     {
209       # GN version: //mojo/public/cpp/utility
210       'target_name': 'mojo_utility',
211       'type': 'static_library',
212       'sources': [
213         'src/mojo/public/cpp/utility/mutex.h',
214         'src/mojo/public/cpp/utility/run_loop.h',
215         'src/mojo/public/cpp/utility/run_loop_handler.h',
216         'src/mojo/public/cpp/utility/thread.h',
217         'src/mojo/public/cpp/utility/lib/mutex.cc',
218         'src/mojo/public/cpp/utility/lib/run_loop.cc',
219         'src/mojo/public/cpp/utility/lib/thread.cc',
220         'src/mojo/public/cpp/utility/lib/thread_local.h',
221         'src/mojo/public/cpp/utility/lib/thread_local_posix.cc',
222         'src/mojo/public/cpp/utility/lib/thread_local_win.cc',
223       ],
224       'conditions': [
225         # See crbug.com/342893:
226         ['OS=="win"', {
227           'sources!': [
228             'src/mojo/public/cpp/utility/mutex.h',
229             'src/mojo/public/cpp/utility/thread.h',
230             'src/mojo/public/cpp/utility/lib/mutex.cc',
231             'src/mojo/public/cpp/utility/lib/thread.cc',
232           ],
233         }],
234       ],
235       'include_dirs': [
236         '../..',
237       ],
238     },
239     {
240       'target_name': 'mojo_interface_bindings_mojom',
241       'type': 'none',
242       'variables': {
243         'require_interface_bindings': 0,
244         'mojom_files': [
245           'src/mojo/public/interfaces/bindings/interface_control_messages.mojom',
246         ],
247       },
248       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
249     },
250     {
251       'target_name': 'mojo_interface_bindings_cpp_sources',
252       'type': 'none',
253       'dependencies': [
254         'mojo_interface_bindings_mojom',
255       ],
256     },
257     {
258       # This target can be used to introduce a dependency on interface bindings
259       # generation without introducing any side-effects in the dependent
260       # target's configuration.
261       'target_name': 'mojo_interface_bindings_generation',
262       'type': 'none',
263       'dependencies': [
264         'mojo_interface_bindings_cpp_sources',
265       ],
266     },
267     {
268       # GN version: //mojo/public/c/test_support
269       'target_name': 'mojo_public_test_support',
270       'defines': [
271         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
272       ],
273       'include_dirs': [
274         '../..',
275       ],
276       'direct_dependent_settings': {
277         'include_dirs': [
278           '../..',
279         ],
280       },
281       'sources': [
282         'src/mojo/public/c/test_support/test_support.h',
283         'src/mojo/public/c/test_support/test_support_export.h',
284         # TODO(vtl): Convert this to thunks http://crbug.com/386799
285         'src/mojo/public/tests/test_support_private.cc',
286         'src/mojo/public/tests/test_support_private.h',
287       ],
288       'conditions': [
289         ['OS=="ios"', {
290           'type': 'static_library',
291         }, {
292           'type': 'shared_library',
293         }],
294         ['OS=="mac"', {
295           'xcode_settings': {
296             # Make it a run-path dependent library.
297             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
298           },
299         }],
300       ],
301     },
302     {
303       # GN version: //mojo/public/cpp/test_support:test_utils
304       'target_name': 'mojo_public_test_utils',
305       'type': 'static_library',
306       'dependencies': [
307         '../../base/base.gyp:base',
308         '../../testing/gtest.gyp:gtest',
309         'mojo_public_test_support',
310       ],
311       'sources': [
312         'src/mojo/public/cpp/test_support/lib/test_support.cc',
313         'src/mojo/public/cpp/test_support/lib/test_utils.cc',
314         'src/mojo/public/cpp/test_support/test_utils.h',
315       ],
316     },
317     {
318       # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils
319       'target_name': 'mojo_public_bindings_test_utils',
320       'type': 'static_library',
321       'dependencies': [
322         '../../base/base.gyp:base',
323       ],
324       'sources': [
325         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.cc',
326         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.h',
327       ],
328     },
329     {
330       'target_name': 'mojo_public_test_interfaces_mojom',
331       'type': 'none',
332       'variables': {
333         'mojom_files': [
334           'src/mojo/public/interfaces/bindings/tests/math_calculator.mojom',
335           'src/mojo/public/interfaces/bindings/tests/no_module.mojom',
336           'src/mojo/public/interfaces/bindings/tests/rect.mojom',
337           'src/mojo/public/interfaces/bindings/tests/regression_tests.mojom',
338           'src/mojo/public/interfaces/bindings/tests/sample_factory.mojom',
339           'src/mojo/public/interfaces/bindings/tests/sample_import.mojom',
340           'src/mojo/public/interfaces/bindings/tests/sample_import2.mojom',
341           'src/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom',
342           'src/mojo/public/interfaces/bindings/tests/sample_service.mojom',
343           'src/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom',
344           'src/mojo/public/interfaces/bindings/tests/test_structs.mojom',
345           'src/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom',
346         ],
347       },
348       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
349     },
350     {
351       # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces
352       'target_name': 'mojo_public_test_interfaces',
353       'type': 'static_library',
354       'export_dependent_settings': [
355         'mojo_cpp_bindings',
356       ],
357       'dependencies': [
358         'mojo_public_test_interfaces_mojom',
359         'mojo_cpp_bindings',
360       ],
361     },
362   ],
363   'conditions': [
364     ['OS == "android"', {
365       'targets': [
366         {
367           # GN version: //mojo/public/java:system
368           'target_name': 'mojo_public_java',
369           'type': 'none',
370           'variables': {
371             'chromium_code': 0,
372             'java_in_dir': 'src/mojo/public/java/system',
373           },
374           'includes': [ '../../build/java.gypi' ],
375         },
376         {
377           'target_name': 'mojo_interface_bindings_java_sources',
378           'type': 'none',
379           'dependencies': [
380             'mojo_interface_bindings_mojom',
381           ],
382         },
383         {
384           # GN version: //mojo/public/java:bindings
385           'target_name': 'mojo_bindings_java',
386           'type': 'none',
387           'variables': {
388             'chromium_code': 0,
389             'java_in_dir': 'src/mojo/public/java/bindings',
390            },
391            'dependencies': [
392              'mojo_interface_bindings_java_sources',
393              'mojo_public_java',
394            ],
395            'includes': [ '../../build/java.gypi' ],
396         },
397       ],
398     }],
399   ],