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