[GCM] Suppress connection attempts when there is no valid connection.
[chromium-blink-merge.git] / mojo / mojo_public.gypi
blob2690c7c773be2f292ca7507bacdee7126f025a0f
2   'targets': [
3     {
4       'target_name': 'mojo_system',
5       'type': 'static_library',
6       'defines': [
7         'MOJO_SYSTEM_IMPLEMENTATION',
8       ],
9       'include_dirs': [
10         '..',
11       ],
12       'direct_dependent_settings': {
13         'include_dirs': [
14           '..',
15         ],
16       },
17       'all_dependent_settings': {
18         'conditions': [
19           # We need to be able to call the MojoSetSystemThunks() function in
20           # system_thunks.cc
21           ['OS=="android"', {
22             'ldflags!': [
23               '-Wl,--exclude-libs=ALL',
24             ],
25           }],
26         ],
27       },
28       'sources': [
29         'public/c/system/buffer.h',
30         'public/c/system/core.h',
31         'public/c/system/data_pipe.h',
32         'public/c/system/functions.h',
33         'public/c/system/macros.h',
34         'public/c/system/message_pipe.h',
35         'public/c/system/system_export.h',
36         'public/c/system/types.h',
37         'public/platform/native/system_thunks.cc',
38         'public/platform/native/system_thunks.h',
39       ],
40     },
41     {
42       'target_name': 'mojo_gles2',
43       'type': 'shared_library',
44       'defines': [
45         'MOJO_GLES2_IMPLEMENTATION',
46         'GLES2_USE_MOJO',
47       ],
48       'include_dirs': [
49         '..',
50       ],
51       'dependencies': [
52         '../third_party/khronos/khronos.gyp:khronos_headers'
53       ],
54       'direct_dependent_settings': {
55         'include_dirs': [
56           '..',
57         ],
58         'defines': [
59           'GLES2_USE_MOJO',
60         ],
61       },
62       'sources': [
63         'public/c/gles2/gles2.h',
64         'public/c/gles2/gles2_export.h',
65         'public/gles2/gles2_private.cc',
66         'public/gles2/gles2_private.h',
67       ],
68       'conditions': [
69         ['OS=="mac"', {
70           'xcode_settings': {
71             # Make it a run-path dependent library.
72             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
73           },
74         }],
75       ],
76     },
77     {
78       'target_name': 'mojo_test_support',
79       'type': 'shared_library',
80       'defines': [
81         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
82       ],
83       'include_dirs': [
84         '..',
85       ],
86       'direct_dependent_settings': {
87         'include_dirs': [
88           '..',
89         ],
90       },
91       'sources': [
92         'public/c/test_support/test_support.h',
93         'public/c/test_support/test_support_export.h',
94         'public/tests/test_support_private.cc',
95         'public/tests/test_support_private.h',
96       ],
97       'conditions': [
98         ['OS=="mac"', {
99           'xcode_settings': {
100             # Make it a run-path dependent library.
101             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
102           },
103         }],
104       ],
105     },
106     {
107       'target_name': 'mojo_public_test_utils',
108       'type': 'static_library',
109       'dependencies': [
110         '../base/base.gyp:base',
111         '../testing/gtest.gyp:gtest',
112         'mojo_test_support',
113       ],
114       'sources': [
115         'public/cpp/test_support/lib/test_support.cc',
116         'public/cpp/test_support/lib/test_utils.cc',
117         'public/cpp/test_support/test_utils.h',
118       ],
119     },
120     # TODO(vtl): Reorganize the mojo_public_*_unittests.
121     {
122       'target_name': 'mojo_public_bindings_unittests',
123       'type': 'executable',
124       'dependencies': [
125         '../testing/gtest.gyp:gtest',
126         'mojo_cpp_bindings',
127         'mojo_environment_standalone',
128         'mojo_public_test_utils',
129         'mojo_run_all_unittests',
130         'mojo_public_test_interfaces',
131         'mojo_utility',
132       ],
133       'sources': [
134         'public/cpp/bindings/tests/array_unittest.cc',
135         'public/cpp/bindings/tests/bounds_checker_unittest.cc',
136         'public/cpp/bindings/tests/buffer_unittest.cc',
137         'public/cpp/bindings/tests/connector_unittest.cc',
138         'public/cpp/bindings/tests/handle_passing_unittest.cc',
139         'public/cpp/bindings/tests/interface_ptr_unittest.cc',
140         'public/cpp/bindings/tests/request_response_unittest.cc',
141         'public/cpp/bindings/tests/router_unittest.cc',
142         'public/cpp/bindings/tests/sample_service_unittest.cc',
143         'public/cpp/bindings/tests/string_unittest.cc',
144         'public/cpp/bindings/tests/struct_unittest.cc',
145         'public/cpp/bindings/tests/type_conversion_unittest.cc',
146         'public/cpp/bindings/tests/validation_test_input_parser.cc',
147         'public/cpp/bindings/tests/validation_test_input_parser.h',
148         'public/cpp/bindings/tests/validation_unittest.cc',
149       ],
150     },
151     {
152       'target_name': 'mojo_public_environment_unittests',
153       'type': 'executable',
154       'dependencies': [
155         '../base/base.gyp:base',
156         '../testing/gtest.gyp:gtest',
157         'mojo_environment_standalone',
158         'mojo_public_test_utils',
159         'mojo_run_all_unittests',
160         'mojo_utility',
161       ],
162       'sources': [
163         'public/cpp/environment/tests/async_waiter_unittest.cc',
164         'public/cpp/environment/tests/logger_unittest.cc',
165         'public/cpp/environment/tests/logging_unittest.cc',
166       ],
167     },
168     {
169       'target_name': 'mojo_public_system_unittests',
170       'type': 'executable',
171       'dependencies': [
172         '../base/base.gyp:base',
173         '../testing/gtest.gyp:gtest',
174         'mojo_cpp_bindings',
175         'mojo_public_test_utils',
176         'mojo_run_all_unittests',
177       ],
178       'sources': [
179         'public/c/system/tests/core_unittest.cc',
180         'public/c/system/tests/core_unittest_pure_c.c',
181         'public/c/system/tests/macros_unittest.cc',
182         'public/cpp/system/tests/core_unittest.cc',
183         'public/cpp/system/tests/macros_unittest.cc',
184       ],
185     },
186     {
187       'target_name': 'mojo_public_utility_unittests',
188       'type': 'executable',
189       'dependencies': [
190         '../base/base.gyp:base',
191         '../testing/gtest.gyp:gtest',
192         'mojo_cpp_bindings',
193         'mojo_public_test_utils',
194         'mojo_run_all_unittests',
195         'mojo_utility',
196       ],
197       'sources': [
198         'public/cpp/utility/tests/mutex_unittest.cc',
199         'public/cpp/utility/tests/run_loop_unittest.cc',
200         'public/cpp/utility/tests/thread_unittest.cc',
201       ],
202       'conditions': [
203         # See crbug.com/342893:
204         ['OS=="win"', {
205           'sources!': [
206             'public/cpp/utility/tests/mutex_unittest.cc',
207             'public/cpp/utility/tests/thread_unittest.cc',
208           ],
209         }],
210       ],
211     },
212     {
213       'target_name': 'mojo_public_system_perftests',
214       'type': 'executable',
215       'dependencies': [
216         '../base/base.gyp:base',
217         '../testing/gtest.gyp:gtest',
218         'mojo_public_test_utils',
219         'mojo_run_all_perftests',
220         'mojo_utility',
221       ],
222       'sources': [
223         'public/c/system/tests/core_perftest.cc',
224       ],
225     },
226     {
227       # GN version: //mojo/public/cpp/bindings
228       'target_name': 'mojo_cpp_bindings',
229       'type': 'static_library',
230       'include_dirs': [
231         '..'
232       ],
233       'sources': [
234         'public/cpp/bindings/array.h',
235         'public/cpp/bindings/callback.h',
236         'public/cpp/bindings/error_handler.h',
237         'public/cpp/bindings/interface_impl.h',
238         'public/cpp/bindings/interface_ptr.h',
239         'public/cpp/bindings/interface_request.h',
240         'public/cpp/bindings/message.h',
241         'public/cpp/bindings/message_filter.h',
242         'public/cpp/bindings/no_interface.h',
243         'public/cpp/bindings/string.h',
244         'public/cpp/bindings/sync_dispatcher.h',
245         'public/cpp/bindings/type_converter.h',
246         'public/cpp/bindings/lib/array_internal.h',
247         'public/cpp/bindings/lib/array_internal.cc',
248         'public/cpp/bindings/lib/array_serialization.h',
249         'public/cpp/bindings/lib/bindings_internal.h',
250         'public/cpp/bindings/lib/bindings_serialization.cc',
251         'public/cpp/bindings/lib/bindings_serialization.h',
252         'public/cpp/bindings/lib/bounds_checker.cc',
253         'public/cpp/bindings/lib/bounds_checker.h',
254         'public/cpp/bindings/lib/buffer.h',
255         'public/cpp/bindings/lib/callback_internal.h',
256         'public/cpp/bindings/lib/connector.cc',
257         'public/cpp/bindings/lib/connector.h',
258         'public/cpp/bindings/lib/filter_chain.cc',
259         'public/cpp/bindings/lib/filter_chain.h',
260         'public/cpp/bindings/lib/fixed_buffer.cc',
261         'public/cpp/bindings/lib/fixed_buffer.h',
262         'public/cpp/bindings/lib/interface_impl_internal.h',
263         'public/cpp/bindings/lib/interface_ptr_internal.h',
264         'public/cpp/bindings/lib/message.cc',
265         'public/cpp/bindings/lib/message_builder.cc',
266         'public/cpp/bindings/lib/message_builder.h',
267         'public/cpp/bindings/lib/message_filter.cc',
268         'public/cpp/bindings/lib/message_header_validator.cc',
269         'public/cpp/bindings/lib/message_header_validator.h',
270         'public/cpp/bindings/lib/message_internal.h',
271         'public/cpp/bindings/lib/message_queue.cc',
272         'public/cpp/bindings/lib/message_queue.h',
273         'public/cpp/bindings/lib/no_interface.cc',
274         'public/cpp/bindings/lib/router.cc',
275         'public/cpp/bindings/lib/router.h',
276         'public/cpp/bindings/lib/shared_data.h',
277         'public/cpp/bindings/lib/shared_ptr.h',
278         'public/cpp/bindings/lib/string_serialization.h',
279         'public/cpp/bindings/lib/string_serialization.cc',
280         'public/cpp/bindings/lib/sync_dispatcher.cc',
281         'public/cpp/bindings/lib/validation_errors.cc',
282         'public/cpp/bindings/lib/validation_errors.h',
283       ],
284     },
285     {
286       # GN version: //mojo/public/js/bindings
287       'target_name': 'mojo_js_bindings',
288       'type': 'static_library',
289       'include_dirs': [
290         '..'
291       ],
292       'sources': [
293         'public/js/bindings/constants.cc',
294         'public/js/bindings/constants.h',
295       ],
296     },
297     {
298       'target_name': 'mojo_public_test_interfaces',
299       'type': 'static_library',
300       'sources': [
301         'public/interfaces/bindings/tests/math_calculator.mojom',
302         'public/interfaces/bindings/tests/sample_factory.mojom',
303         'public/interfaces/bindings/tests/sample_import.mojom',
304         'public/interfaces/bindings/tests/sample_import2.mojom',
305         'public/interfaces/bindings/tests/sample_interfaces.mojom',
306         'public/interfaces/bindings/tests/sample_service.mojom',
307         'public/interfaces/bindings/tests/test_structs.mojom',
308         'public/interfaces/bindings/tests/validation_test_interfaces.mojom',
309       ],
310       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
311       'export_dependent_settings': [
312         'mojo_cpp_bindings',
313       ],
314       'dependencies': [
315         'mojo_cpp_bindings',
316       ],
317     },
318     {
319       'target_name': 'mojo_environment_standalone',
320       'type': 'static_library',
321       'sources': [
322         'public/c/environment/async_waiter.h',
323         'public/c/environment/logger.h',
324         'public/c/environment/logging.h',
325         'public/cpp/environment/environment.h',
326         'public/cpp/environment/lib/default_async_waiter.cc',
327         'public/cpp/environment/lib/default_async_waiter.h',
328         'public/cpp/environment/lib/default_logger.cc',
329         'public/cpp/environment/lib/default_logger.h',
330         'public/cpp/environment/lib/environment.cc',
331         'public/cpp/environment/lib/logging.cc',
332       ],
333       'include_dirs': [
334         '..',
335       ],
336     },
337     {
338       'target_name': 'mojo_utility',
339       'type': 'static_library',
340       'sources': [
341         'public/cpp/utility/mutex.h',
342         'public/cpp/utility/run_loop.h',
343         'public/cpp/utility/run_loop_handler.h',
344         'public/cpp/utility/thread.h',
345         'public/cpp/utility/lib/mutex.cc',
346         'public/cpp/utility/lib/run_loop.cc',
347         'public/cpp/utility/lib/thread.cc',
348         'public/cpp/utility/lib/thread_local.h',
349         'public/cpp/utility/lib/thread_local_posix.cc',
350         'public/cpp/utility/lib/thread_local_win.cc',
351       ],
352       'conditions': [
353         # See crbug.com/342893:
354         ['OS=="win"', {
355           'sources!': [
356             'public/cpp/utility/mutex.h',
357             'public/cpp/utility/thread.h',
358             'public/cpp/utility/lib/mutex.cc',
359             'public/cpp/utility/lib/thread.cc',
360           ],
361         }],
362       ],
363       'include_dirs': [
364         '..',
365       ],
366     },
367     {
368       # GN version: //mojo/public/interfaces/interface_provider:interface_provider
369       'target_name': 'mojo_interface_provider_bindings',
370       'type': 'static_library',
371       'sources': [
372         'public/interfaces/interface_provider/interface_provider.mojom',
373       ],
374       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
375       'dependencies': [
376         'mojo_cpp_bindings',
377       ],
378       'export_dependent_settings': [
379         'mojo_cpp_bindings',
380       ],
381     },
382     {
383       # GN version: //mojo/public/interfaces/service_provider:service_provider
384       'target_name': 'mojo_service_provider_bindings',
385       'type': 'static_library',
386       'sources': [
387         'public/interfaces/service_provider/service_provider.mojom',
388       ],
389       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
390       'dependencies': [
391         'mojo_cpp_bindings',
392       ],
393       'export_dependent_settings': [
394         'mojo_cpp_bindings',
395       ],
396     },
397     {
398       'target_name': 'mojo_application',
399       'type': 'static_library',
400       'sources': [
401         'public/cpp/application/application.h',
402         'public/cpp/application/connect.h',
403         'public/cpp/application/lib/application.cc',
404         'public/cpp/application/lib/service_connector.cc',
405         'public/cpp/application/lib/service_connector.h',
406         'public/cpp/application/lib/service_registry.cc',
407         'public/cpp/application/lib/service_registry.h',
408       ],
409       'dependencies': [
410         'mojo_service_provider_bindings',
411       ],
412       'export_dependent_settings': [
413         'mojo_service_provider_bindings',
414       ],
415     },
416   ],
417   'conditions': [
418     ['OS == "android"', {
419       'targets': [
420         {
421           'target_name': 'mojo_public_java',
422           'type': 'none',
423           'variables': {
424             'java_in_dir': 'public/java',
425           },
426           'includes': [ '../build/java.gypi' ],
427         },
428         {
429           'target_name': 'mojo_bindings_java',
430           'type': 'none',
431           'variables': {
432             'java_in_dir': 'bindings/java',
433           },
434           'dependencies': [
435             'mojo_public_java',
436           ],
437           'includes': [ '../build/java.gypi' ],
438         },
439       ],
440     }],
441   ],