Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / third_party / mojo / mojo_public.gyp
blob673e1c42cbb5335f5c501f2923ad0391196ccf6b
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         'src/mojo/public/cpp/bindings/lib/validation_util.cc',
131         'src/mojo/public/cpp/bindings/lib/validation_util.h',
132       ],
133     },
134     {
135       # GN version: //mojo/public/js
136       'target_name': 'mojo_js_bindings',
137       'type': 'static_library',
138       'include_dirs': [
139         '../..'
140       ],
141       'sources': [
142         'src/mojo/public/js/constants.cc',
143         'src/mojo/public/js/constants.h',
144       ],
145     },
146     {
147       # GN version: //mojo/public/cpp/environment:standalone
148       'target_name': 'mojo_environment_standalone',
149       'type': 'static_library',
150       'sources': [
151         'src/mojo/public/c/environment/async_waiter.h',
152         'src/mojo/public/c/environment/logger.h',
153         'src/mojo/public/cpp/environment/async_waiter.h',
154         'src/mojo/public/cpp/environment/environment.h',
155         'src/mojo/public/cpp/environment/lib/async_waiter.cc',
156         'src/mojo/public/cpp/environment/lib/default_async_waiter.cc',
157         'src/mojo/public/cpp/environment/lib/default_async_waiter.h',
158         'src/mojo/public/cpp/environment/lib/default_logger.cc',
159         'src/mojo/public/cpp/environment/lib/default_logger.h',
160         'src/mojo/public/cpp/environment/lib/default_task_tracker.cc',
161         'src/mojo/public/cpp/environment/lib/default_task_tracker.h',
162         'src/mojo/public/cpp/environment/lib/environment.cc',
163         'src/mojo/public/cpp/environment/lib/logging.cc',
164         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc',
165         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.h',
166         'src/mojo/public/cpp/environment/logging.h',
167         'src/mojo/public/cpp/environment/task_tracker.h',
168       ],
169       'include_dirs': [
170         '../..',
171       ],
172     },
173     {
174       # GN version: //mojo/public/cpp/utility
175       'target_name': 'mojo_utility',
176       'type': 'static_library',
177       'sources': [
178         'src/mojo/public/cpp/utility/mutex.h',
179         'src/mojo/public/cpp/utility/run_loop.h',
180         'src/mojo/public/cpp/utility/run_loop_handler.h',
181         'src/mojo/public/cpp/utility/thread.h',
182         'src/mojo/public/cpp/utility/lib/mutex.cc',
183         'src/mojo/public/cpp/utility/lib/run_loop.cc',
184         'src/mojo/public/cpp/utility/lib/thread.cc',
185         'src/mojo/public/cpp/utility/lib/thread_local.h',
186         'src/mojo/public/cpp/utility/lib/thread_local_posix.cc',
187         'src/mojo/public/cpp/utility/lib/thread_local_win.cc',
188       ],
189       'conditions': [
190         # See crbug.com/342893:
191         ['OS=="win"', {
192           'sources!': [
193             'src/mojo/public/cpp/utility/mutex.h',
194             'src/mojo/public/cpp/utility/thread.h',
195             'src/mojo/public/cpp/utility/lib/mutex.cc',
196             'src/mojo/public/cpp/utility/lib/thread.cc',
197           ],
198         }],
199       ],
200       'include_dirs': [
201         '../..',
202       ],
203     },
204     {
205       'target_name': 'mojo_application_bindings_mojom',
206       'type': 'none',
207       'variables': {
208         'mojom_files': [
209           'src/mojo/public/interfaces/application/application.mojom',
210           'src/mojo/public/interfaces/application/service_provider.mojom',
211           'src/mojo/public/interfaces/application/shell.mojom',
212         ],
213       },
214       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
215     },
216     {
217       # GN version: //mojo/public/interfaces/application:application
218       'target_name': 'mojo_application_bindings',
219       'type': 'static_library',
220       'dependencies': [
221         'mojo_application_bindings_mojom',
222         'mojo_cpp_bindings',
223       ],
224       'export_dependent_settings': [
225         'mojo_cpp_bindings',
226       ],
227     },
228     {
229       # GN version: //mojo/public/cpp/application
230       'target_name': 'mojo_application_base',
231       'type': 'static_library',
232       'sources': [
233         'src/mojo/public/cpp/application/application_connection.h',
234         'src/mojo/public/cpp/application/application_delegate.h',
235         'src/mojo/public/cpp/application/application_impl.h',
236         'src/mojo/public/cpp/application/connect.h',
237         'src/mojo/public/cpp/application/interface_factory.h',
238         'src/mojo/public/cpp/application/interface_factory_impl.h',
239         'src/mojo/public/cpp/application/lib/application_connection.cc',
240         'src/mojo/public/cpp/application/lib/application_delegate.cc',
241         'src/mojo/public/cpp/application/lib/application_impl.cc',
242         'src/mojo/public/cpp/application/lib/service_provider_impl.cc',
243         'src/mojo/public/cpp/application/lib/service_connector.cc',
244         'src/mojo/public/cpp/application/lib/service_connector.h',
245         'src/mojo/public/cpp/application/lib/service_registry.cc',
246         'src/mojo/public/cpp/application/lib/service_registry.h',
247         'src/mojo/public/cpp/application/service_provider_impl.h',
248       ],
249       'dependencies': [
250         'mojo_application_bindings',
251       ],
252       'export_dependent_settings': [
253         'mojo_application_bindings',
254       ],
255     },
256     {
257       # GN version: //mojo/public/cpp/application:standalone"
258       'target_name': 'mojo_application_standalone',
259       'type': 'static_library',
260       'sources': [
261         'src/mojo/public/cpp/application/lib/application_runner.cc',
262         'src/mojo/public/cpp/application/application_runner.h',
263       ],
264       'dependencies': [
265         'mojo_application_base',
266         'mojo_environment_standalone',
267       ],
268       'export_dependent_settings': [
269         'mojo_application_base',
270       ],
271     },
272     {
273       # GN version: //mojo/public/c/test_support
274       'target_name': 'mojo_test_support',
275       'defines': [
276         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
277       ],
278       'include_dirs': [
279         '../..',
280       ],
281       'direct_dependent_settings': {
282         'include_dirs': [
283           '../..',
284         ],
285       },
286       'sources': [
287         'src/mojo/public/c/test_support/test_support.h',
288         'src/mojo/public/c/test_support/test_support_export.h',
289         # TODO(vtl): Convert this to thunks http://crbug.com/386799
290         'src/mojo/public/tests/test_support_private.cc',
291         'src/mojo/public/tests/test_support_private.h',
292       ],
293       'conditions': [
294         ['OS=="ios"', {
295           'type': 'static_library',
296         }, {
297           'type': 'shared_library',
298         }],
299         ['OS=="mac"', {
300           'xcode_settings': {
301             # Make it a run-path dependent library.
302             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
303           },
304         }],
305       ],
306     },
307     {
308       # GN version: //mojo/public/cpp/test_support:test_utils
309       'target_name': 'mojo_public_test_utils',
310       'type': 'static_library',
311       'dependencies': [
312         '../../base/base.gyp:base',
313         '../../testing/gtest.gyp:gtest',
314         'mojo_test_support',
315       ],
316       'sources': [
317         'src/mojo/public/cpp/test_support/lib/test_support.cc',
318         'src/mojo/public/cpp/test_support/lib/test_utils.cc',
319         'src/mojo/public/cpp/test_support/test_utils.h',
320       ],
321     },
322     {
323       # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils
324       'target_name': 'mojo_public_bindings_test_utils',
325       'type': 'static_library',
326       'dependencies': [
327         '../../base/base.gyp:base',
328       ],
329       'sources': [
330         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.cc',
331         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.h',
332       ],
333     },
334     {
335       'target_name': 'mojo_public_test_interfaces_mojom',
336       'type': 'none',
337       'variables': {
338         'mojom_files': [
339           'src/mojo/public/interfaces/bindings/tests/math_calculator.mojom',
340           'src/mojo/public/interfaces/bindings/tests/no_module.mojom',
341           'src/mojo/public/interfaces/bindings/tests/rect.mojom',
342           'src/mojo/public/interfaces/bindings/tests/regression_tests.mojom',
343           'src/mojo/public/interfaces/bindings/tests/sample_factory.mojom',
344           'src/mojo/public/interfaces/bindings/tests/sample_import.mojom',
345           'src/mojo/public/interfaces/bindings/tests/sample_import2.mojom',
346           'src/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom',
347           'src/mojo/public/interfaces/bindings/tests/sample_service.mojom',
348           'src/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom',
349           'src/mojo/public/interfaces/bindings/tests/test_structs.mojom',
350           'src/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom',
351         ],
352       },
353       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
354     },
355     {
356       # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces
357       'target_name': 'mojo_public_test_interfaces',
358       'type': 'static_library',
359       'export_dependent_settings': [
360         'mojo_cpp_bindings',
361       ],
362       'dependencies': [
363         'mojo_public_test_interfaces_mojom',
364         'mojo_cpp_bindings',
365       ],
366     },
367   ],
368   'conditions': [
369     ['OS == "android"', {
370       'targets': [
371         {
372           # GN version: //mojo/public/java_system
373           'target_name': 'mojo_public_java',
374           'type': 'none',
375           'variables': {
376             'java_in_dir': 'src/mojo/public/java/system',
377           },
378           'includes': [ '../../build/java.gypi' ],
379         },
380         {
381         # GN version: //mojo/public/java_bindings
382           'target_name': 'mojo_bindings_java',
383           'type': 'none',
384           'variables': {
385             'java_in_dir': 'src/mojo/public/java/bindings',
386            },
387            'dependencies': [
388              'mojo_public_java',
389            ],
390            'includes': [ '../../build/java.gypi' ],
391         },
392       ],
393     }],
394   ],