Mojo: Add the IInterfaceProvider interface.
[chromium-blink-merge.git] / mojo / mojo_public.gypi
blobc033749a4acc29ff408fcbb68cb28f8ac51ecf0a
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       ],
165     },
166     {
167       'target_name': 'mojo_public_system_unittests',
168       'type': 'executable',
169       'dependencies': [
170         '../base/base.gyp:base',
171         '../testing/gtest.gyp:gtest',
172         'mojo_cpp_bindings',
173         'mojo_public_test_utils',
174         'mojo_run_all_unittests',
175       ],
176       'sources': [
177         'public/c/system/tests/core_unittest.cc',
178         'public/c/system/tests/core_unittest_pure_c.c',
179         'public/c/system/tests/macros_unittest.cc',
180         'public/cpp/system/tests/core_unittest.cc',
181         'public/cpp/system/tests/macros_unittest.cc',
182       ],
183     },
184     {
185       'target_name': 'mojo_public_utility_unittests',
186       'type': 'executable',
187       'dependencies': [
188         '../base/base.gyp:base',
189         '../testing/gtest.gyp:gtest',
190         'mojo_cpp_bindings',
191         'mojo_public_test_utils',
192         'mojo_run_all_unittests',
193         'mojo_utility',
194       ],
195       'sources': [
196         'public/cpp/utility/tests/mutex_unittest.cc',
197         'public/cpp/utility/tests/run_loop_unittest.cc',
198         'public/cpp/utility/tests/thread_unittest.cc',
199       ],
200       'conditions': [
201         # See crbug.com/342893:
202         ['OS=="win"', {
203           'sources!': [
204             'public/cpp/utility/tests/mutex_unittest.cc',
205             'public/cpp/utility/tests/thread_unittest.cc',
206           ],
207         }],
208       ],
209     },
210     {
211       'target_name': 'mojo_public_system_perftests',
212       'type': 'executable',
213       'dependencies': [
214         '../base/base.gyp:base',
215         '../testing/gtest.gyp:gtest',
216         'mojo_public_test_utils',
217         'mojo_run_all_perftests',
218         'mojo_utility',
219       ],
220       'sources': [
221         'public/c/system/tests/core_perftest.cc',
222       ],
223     },
224     {
225       # GN version: //mojo/public/cpp/bindings
226       'target_name': 'mojo_cpp_bindings',
227       'type': 'static_library',
228       'include_dirs': [
229         '..'
230       ],
231       'sources': [
232         'public/cpp/bindings/array.h',
233         'public/cpp/bindings/callback.h',
234         'public/cpp/bindings/error_handler.h',
235         'public/cpp/bindings/interface_impl.h',
236         'public/cpp/bindings/interface_ptr.h',
237         'public/cpp/bindings/interface_request.h',
238         'public/cpp/bindings/message.h',
239         'public/cpp/bindings/message_filter.h',
240         'public/cpp/bindings/no_interface.h',
241         'public/cpp/bindings/string.h',
242         'public/cpp/bindings/sync_dispatcher.h',
243         'public/cpp/bindings/type_converter.h',
244         'public/cpp/bindings/lib/array_internal.h',
245         'public/cpp/bindings/lib/array_internal.cc',
246         'public/cpp/bindings/lib/array_serialization.h',
247         'public/cpp/bindings/lib/bindings_internal.h',
248         'public/cpp/bindings/lib/bindings_serialization.cc',
249         'public/cpp/bindings/lib/bindings_serialization.h',
250         'public/cpp/bindings/lib/bounds_checker.cc',
251         'public/cpp/bindings/lib/bounds_checker.h',
252         'public/cpp/bindings/lib/buffer.h',
253         'public/cpp/bindings/lib/callback_internal.h',
254         'public/cpp/bindings/lib/connector.cc',
255         'public/cpp/bindings/lib/connector.h',
256         'public/cpp/bindings/lib/filter_chain.cc',
257         'public/cpp/bindings/lib/filter_chain.h',
258         'public/cpp/bindings/lib/fixed_buffer.cc',
259         'public/cpp/bindings/lib/fixed_buffer.h',
260         'public/cpp/bindings/lib/interface_impl_internal.h',
261         'public/cpp/bindings/lib/interface_ptr_internal.h',
262         'public/cpp/bindings/lib/message.cc',
263         'public/cpp/bindings/lib/message_builder.cc',
264         'public/cpp/bindings/lib/message_builder.h',
265         'public/cpp/bindings/lib/message_filter.cc',
266         'public/cpp/bindings/lib/message_header_validator.cc',
267         'public/cpp/bindings/lib/message_header_validator.h',
268         'public/cpp/bindings/lib/message_internal.h',
269         'public/cpp/bindings/lib/message_queue.cc',
270         'public/cpp/bindings/lib/message_queue.h',
271         'public/cpp/bindings/lib/no_interface.cc',
272         'public/cpp/bindings/lib/router.cc',
273         'public/cpp/bindings/lib/router.h',
274         'public/cpp/bindings/lib/shared_data.h',
275         'public/cpp/bindings/lib/shared_ptr.h',
276         'public/cpp/bindings/lib/string_serialization.h',
277         'public/cpp/bindings/lib/string_serialization.cc',
278         'public/cpp/bindings/lib/sync_dispatcher.cc',
279         'public/cpp/bindings/lib/validation_errors.cc',
280         'public/cpp/bindings/lib/validation_errors.h',
281       ],
282     },
283     {
284       # GN version: //mojo/public/js/bindings
285       'target_name': 'mojo_js_bindings',
286       'type': 'static_library',
287       'include_dirs': [
288         '..'
289       ],
290       'sources': [
291         'public/js/bindings/constants.cc',
292         'public/js/bindings/constants.h',
293       ],
294     },
295     {
296       'target_name': 'mojo_public_test_interfaces',
297       'type': 'static_library',
298       'sources': [
299         'public/interfaces/bindings/tests/math_calculator.mojom',
300         'public/interfaces/bindings/tests/sample_factory.mojom',
301         'public/interfaces/bindings/tests/sample_import.mojom',
302         'public/interfaces/bindings/tests/sample_import2.mojom',
303         'public/interfaces/bindings/tests/sample_interfaces.mojom',
304         'public/interfaces/bindings/tests/sample_service.mojom',
305         'public/interfaces/bindings/tests/test_structs.mojom',
306       ],
307       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
308       'export_dependent_settings': [
309         'mojo_cpp_bindings',
310       ],
311       'dependencies': [
312         'mojo_cpp_bindings',
313       ],
314     },
315     {
316       'target_name': 'mojo_environment_standalone',
317       'type': 'static_library',
318       'sources': [
319         'public/cpp/environment/default_async_waiter.h',
320         'public/cpp/environment/environment.h',
321         'public/cpp/environment/lib/default_async_waiter.cc',
322         'public/cpp/environment/lib/environment.cc',
323       ],
324       'include_dirs': [
325         '..',
326       ],
327     },
328     {
329       'target_name': 'mojo_utility',
330       'type': 'static_library',
331       'sources': [
332         'public/cpp/utility/mutex.h',
333         'public/cpp/utility/run_loop.h',
334         'public/cpp/utility/run_loop_handler.h',
335         'public/cpp/utility/thread.h',
336         'public/cpp/utility/lib/mutex.cc',
337         'public/cpp/utility/lib/run_loop.cc',
338         'public/cpp/utility/lib/thread.cc',
339         'public/cpp/utility/lib/thread_local.h',
340         'public/cpp/utility/lib/thread_local_posix.cc',
341         'public/cpp/utility/lib/thread_local_win.cc',
342       ],
343       'conditions': [
344         # See crbug.com/342893:
345         ['OS=="win"', {
346           'sources!': [
347             'public/cpp/utility/mutex.h',
348             'public/cpp/utility/thread.h',
349             'public/cpp/utility/lib/mutex.cc',
350             'public/cpp/utility/lib/thread.cc',
351           ],
352         }],
353       ],
354       'include_dirs': [
355         '..',
356       ],
357     },
358     {
359       # GN version: //mojo/public/interfaces/interface_provider:interface_provider
360       'target_name': 'mojo_interface_provider_bindings',
361       'type': 'static_library',
362       'sources': [
363         'public/interfaces/interface_provider/interface_provider.mojom',
364       ],
365       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
366       'dependencies': [
367         'mojo_cpp_bindings',
368       ],
369       'export_dependent_settings': [
370         'mojo_cpp_bindings',
371       ],
372     },
373     {
374       # GN version: //mojo/public/interfaces/service_provider:service_provider
375       'target_name': 'mojo_service_provider_bindings',
376       'type': 'static_library',
377       'sources': [
378         'public/interfaces/service_provider/service_provider.mojom',
379       ],
380       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
381       'dependencies': [
382         'mojo_cpp_bindings',
383       ],
384       'export_dependent_settings': [
385         'mojo_cpp_bindings',
386       ],
387     },
388     {
389       'target_name': 'mojo_application',
390       'type': 'static_library',
391       'sources': [
392         'public/cpp/application/application.h',
393         'public/cpp/application/connect.h',
394         'public/cpp/application/lib/application.cc',
395         'public/cpp/application/lib/service_connector.cc',
396         'public/cpp/application/lib/service_connector.h',
397       ],
398       'dependencies': [
399         'mojo_service_provider_bindings',
400       ],
401       'export_dependent_settings': [
402         'mojo_service_provider_bindings',
403       ],
404     },
405   ],
406   'conditions': [
407     ['OS == "android"', {
408       'targets': [
409         {
410           'target_name': 'mojo_public_java',
411           'type': 'none',
412           'variables': {
413             'java_in_dir': 'public/java',
414           },
415           'includes': [ '../build/java.gypi' ],
416         },
417         {
418           'target_name': 'mojo_bindings_java',
419           'type': 'none',
420           'variables': {
421             'java_in_dir': 'bindings/java',
422           },
423           'dependencies': [
424             'mojo_public_java',
425           ],
426           'includes': [ '../build/java.gypi' ],
427         },
428       ],
429     }],
430   ],