Warn about unused result in LoginDatabase.
[chromium-blink-merge.git] / third_party / mojo / mojo_public.gyp
blob0ab9e879bcc74d6d41f3e87f9f354de91a5232fa
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       # GN version: //mojo/public/c/system
41       'target_name': 'mojo_system',
42       'type': 'static_library',
43       'defines': [
44         'MOJO_SYSTEM_IMPLEMENTATION',
45       ],
46       'all_dependent_settings': {
47         'conditions': [
48           # We need to be able to call the MojoSetSystemThunks() function in
49           # system_thunks.cc
50           ['OS=="android"', {
51             'ldflags!': [
52               '-Wl,--exclude-libs=ALL',
53             ],
54           }],
55         ],
56       },
57       'sources': [
58         'src/mojo/public/c/system/buffer.h',
59         'src/mojo/public/c/system/core.h',
60         'src/mojo/public/c/system/data_pipe.h',
61         'src/mojo/public/c/system/functions.h',
62         'src/mojo/public/c/system/macros.h',
63         'src/mojo/public/c/system/message_pipe.h',
64         'src/mojo/public/c/system/system_export.h',
65         'src/mojo/public/c/system/types.h',
66         'src/mojo/public/platform/native/system_thunks.cc',
67         'src/mojo/public/platform/native/system_thunks.h',
68       ],
69     },
70     {
71       # GN version: //mojo/public/cpp/bindings
72       'target_name': 'mojo_cpp_bindings',
73       'type': 'static_library',
74       'include_dirs': [
75         '../..'
76       ],
77       'sources': [
78         'src/mojo/public/cpp/bindings/array.h',
79         'src/mojo/public/cpp/bindings/binding.h',
80         'src/mojo/public/cpp/bindings/callback.h',
81         'src/mojo/public/cpp/bindings/error_handler.h',
82         'src/mojo/public/cpp/bindings/interface_impl.h',
83         'src/mojo/public/cpp/bindings/interface_ptr.h',
84         'src/mojo/public/cpp/bindings/interface_request.h',
85         'src/mojo/public/cpp/bindings/message.h',
86         'src/mojo/public/cpp/bindings/message_filter.h',
87         'src/mojo/public/cpp/bindings/no_interface.h',
88         'src/mojo/public/cpp/bindings/string.h',
89         'src/mojo/public/cpp/bindings/strong_binding.h',
90         'src/mojo/public/cpp/bindings/type_converter.h',
91         'src/mojo/public/cpp/bindings/lib/array_internal.h',
92         'src/mojo/public/cpp/bindings/lib/array_internal.cc',
93         'src/mojo/public/cpp/bindings/lib/array_serialization.h',
94         'src/mojo/public/cpp/bindings/lib/bindings_internal.h',
95         'src/mojo/public/cpp/bindings/lib/bindings_serialization.cc',
96         'src/mojo/public/cpp/bindings/lib/bindings_serialization.h',
97         'src/mojo/public/cpp/bindings/lib/bounds_checker.cc',
98         'src/mojo/public/cpp/bindings/lib/bounds_checker.h',
99         'src/mojo/public/cpp/bindings/lib/buffer.h',
100         'src/mojo/public/cpp/bindings/lib/callback_internal.h',
101         'src/mojo/public/cpp/bindings/lib/connector.cc',
102         'src/mojo/public/cpp/bindings/lib/connector.h',
103         'src/mojo/public/cpp/bindings/lib/filter_chain.cc',
104         'src/mojo/public/cpp/bindings/lib/filter_chain.h',
105         'src/mojo/public/cpp/bindings/lib/fixed_buffer.cc',
106         'src/mojo/public/cpp/bindings/lib/fixed_buffer.h',
107         'src/mojo/public/cpp/bindings/lib/interface_ptr_internal.h',
108         'src/mojo/public/cpp/bindings/lib/map_data_internal.h',
109         'src/mojo/public/cpp/bindings/lib/map_internal.h',
110         'src/mojo/public/cpp/bindings/lib/map_serialization.h',
111         'src/mojo/public/cpp/bindings/lib/message.cc',
112         'src/mojo/public/cpp/bindings/lib/message_builder.cc',
113         'src/mojo/public/cpp/bindings/lib/message_builder.h',
114         'src/mojo/public/cpp/bindings/lib/message_filter.cc',
115         'src/mojo/public/cpp/bindings/lib/message_header_validator.cc',
116         'src/mojo/public/cpp/bindings/lib/message_header_validator.h',
117         'src/mojo/public/cpp/bindings/lib/message_internal.h',
118         'src/mojo/public/cpp/bindings/lib/message_queue.cc',
119         'src/mojo/public/cpp/bindings/lib/message_queue.h',
120         'src/mojo/public/cpp/bindings/lib/no_interface.cc',
121         'src/mojo/public/cpp/bindings/lib/router.cc',
122         'src/mojo/public/cpp/bindings/lib/router.h',
123         'src/mojo/public/cpp/bindings/lib/shared_data.h',
124         'src/mojo/public/cpp/bindings/lib/shared_ptr.h',
125         'src/mojo/public/cpp/bindings/lib/string_serialization.h',
126         'src/mojo/public/cpp/bindings/lib/string_serialization.cc',
127         'src/mojo/public/cpp/bindings/lib/validate_params.h',
128         'src/mojo/public/cpp/bindings/lib/validation_errors.cc',
129         'src/mojo/public/cpp/bindings/lib/validation_errors.h',
130       ],
131     },
132     {
133       # GN version: //mojo/public/js
134       'target_name': 'mojo_js_bindings',
135       'type': 'static_library',
136       'include_dirs': [
137         '../..'
138       ],
139       'sources': [
140         'src/mojo/public/js/constants.cc',
141         'src/mojo/public/js/constants.h',
142       ],
143     },
144     {
145       # GN version: //mojo/public/cpp/environment:standalone
146       'target_name': 'mojo_environment_standalone',
147       'type': 'static_library',
148       'sources': [
149         'src/mojo/public/c/environment/async_waiter.h',
150         'src/mojo/public/c/environment/logger.h',
151         'src/mojo/public/cpp/environment/async_waiter.h',
152         'src/mojo/public/cpp/environment/environment.h',
153         'src/mojo/public/cpp/environment/lib/async_waiter.cc',
154         'src/mojo/public/cpp/environment/lib/default_async_waiter.cc',
155         'src/mojo/public/cpp/environment/lib/default_async_waiter.h',
156         'src/mojo/public/cpp/environment/lib/default_logger.cc',
157         'src/mojo/public/cpp/environment/lib/default_logger.h',
158         'src/mojo/public/cpp/environment/lib/environment.cc',
159         'src/mojo/public/cpp/environment/lib/logging.cc',
160         'src/mojo/public/cpp/environment/logging.h',
161       ],
162       'include_dirs': [
163         '../..',
164       ],
165     },
166     {
167       # GN version: //mojo/public/cpp/utility
168       'target_name': 'mojo_utility',
169       'type': 'static_library',
170       'sources': [
171         'src/mojo/public/cpp/utility/mutex.h',
172         'src/mojo/public/cpp/utility/run_loop.h',
173         'src/mojo/public/cpp/utility/run_loop_handler.h',
174         'src/mojo/public/cpp/utility/thread.h',
175         'src/mojo/public/cpp/utility/lib/mutex.cc',
176         'src/mojo/public/cpp/utility/lib/run_loop.cc',
177         'src/mojo/public/cpp/utility/lib/thread.cc',
178         'src/mojo/public/cpp/utility/lib/thread_local.h',
179         'src/mojo/public/cpp/utility/lib/thread_local_posix.cc',
180         'src/mojo/public/cpp/utility/lib/thread_local_win.cc',
181       ],
182       'conditions': [
183         # See crbug.com/342893:
184         ['OS=="win"', {
185           'sources!': [
186             'src/mojo/public/cpp/utility/mutex.h',
187             'src/mojo/public/cpp/utility/thread.h',
188             'src/mojo/public/cpp/utility/lib/mutex.cc',
189             'src/mojo/public/cpp/utility/lib/thread.cc',
190           ],
191         }],
192       ],
193       'include_dirs': [
194         '../..',
195       ],
196     },
197     {
198       'target_name': 'mojo_application_bindings_mojom',
199       'type': 'none',
200       'variables': {
201         'mojom_files': [
202           'src/mojo/public/interfaces/application/application.mojom',
203           'src/mojo/public/interfaces/application/service_provider.mojom',
204           'src/mojo/public/interfaces/application/shell.mojom',
205         ],
206       },
207       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
208     },
209     {
210       # GN version: //mojo/public/interfaces/application:application
211       'target_name': 'mojo_application_bindings',
212       'type': 'static_library',
213       'dependencies': [
214         'mojo_application_bindings_mojom',
215         'mojo_cpp_bindings',
216       ],
217       'export_dependent_settings': [
218         'mojo_cpp_bindings',
219       ],
220     },
221     {
222       # GN version: //mojo/public/cpp/application
223       'target_name': 'mojo_application_base',
224       'type': 'static_library',
225       'sources': [
226         'src/mojo/public/cpp/application/application_connection.h',
227         'src/mojo/public/cpp/application/application_delegate.h',
228         'src/mojo/public/cpp/application/application_impl.h',
229         'src/mojo/public/cpp/application/connect.h',
230         'src/mojo/public/cpp/application/interface_factory.h',
231         'src/mojo/public/cpp/application/interface_factory_impl.h',
232         'src/mojo/public/cpp/application/lib/application_connection.cc',
233         'src/mojo/public/cpp/application/lib/application_delegate.cc',
234         'src/mojo/public/cpp/application/lib/application_impl.cc',
235         'src/mojo/public/cpp/application/lib/service_provider_impl.cc',
236         'src/mojo/public/cpp/application/lib/service_connector.cc',
237         'src/mojo/public/cpp/application/lib/service_connector.h',
238         'src/mojo/public/cpp/application/lib/service_registry.cc',
239         'src/mojo/public/cpp/application/lib/service_registry.h',
240         'src/mojo/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         'src/mojo/public/cpp/application/lib/application_runner.cc',
255         'src/mojo/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         'src/mojo/public/c/test_support/test_support.h',
281         'src/mojo/public/c/test_support/test_support_export.h',
282         # TODO(vtl): Convert this to thunks http://crbug.com/386799
283         'src/mojo/public/tests/test_support_private.cc',
284         'src/mojo/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         'src/mojo/public/cpp/test_support/lib/test_support.cc',
311         'src/mojo/public/cpp/test_support/lib/test_utils.cc',
312         'src/mojo/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         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.cc',
324         'src/mojo/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           'src/mojo/public/interfaces/bindings/tests/math_calculator.mojom',
333           'src/mojo/public/interfaces/bindings/tests/no_module.mojom',
334           'src/mojo/public/interfaces/bindings/tests/rect.mojom',
335           'src/mojo/public/interfaces/bindings/tests/regression_tests.mojom',
336           'src/mojo/public/interfaces/bindings/tests/regression_tests_import.mojom',
337           'src/mojo/public/interfaces/bindings/tests/sample_factory.mojom',
338           'src/mojo/public/interfaces/bindings/tests/sample_import.mojom',
339           'src/mojo/public/interfaces/bindings/tests/sample_import2.mojom',
340           'src/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom',
341           'src/mojo/public/interfaces/bindings/tests/sample_service.mojom',
342           'src/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom',
343           'src/mojo/public/interfaces/bindings/tests/test_structs.mojom',
344           'src/mojo/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': 'src/mojo/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': 'src/mojo/public/java/bindings',
380            },
381            'dependencies': [
382              'mojo_public_java',
383            ],
384            'includes': [ '../../build/java.gypi' ],
385         },
386       ],
387     }],
388   ],