Fix OOP <webview> resize and autosize.
[chromium-blink-merge.git] / third_party / mojo / mojo_public.gyp
blobe8cea601df1c6a63868d3ff354adaac182a95454
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       'target_name': 'mojo_system',
41       'type': 'static_library',
42       'defines': [
43         'MOJO_SYSTEM_IMPLEMENTATION',
44       ],
45       'all_dependent_settings': {
46         'conditions': [
47           # We need to be able to call the MojoSetSystemThunks() function in
48           # system_thunks.cc
49           ['OS=="android"', {
50             'ldflags!': [
51               '-Wl,--exclude-libs=ALL',
52             ],
53           }],
54         ],
55       },
56       'sources': [
57         'src/mojo/public/platform/native/system_thunks.cc',
58         'src/mojo/public/platform/native/system_thunks.h',
59       ],
60       'dependencies': [
61         'mojo_system_headers',
62       ],
63     },
64     {
65       # GN version: //mojo/public/c/system
66       'target_name': 'mojo_system_headers',
67       'type': 'none',
68       'sources': [
69         'src/mojo/public/c/system/buffer.h',
70         'src/mojo/public/c/system/core.h',
71         'src/mojo/public/c/system/data_pipe.h',
72         'src/mojo/public/c/system/functions.h',
73         'src/mojo/public/c/system/macros.h',
74         'src/mojo/public/c/system/message_pipe.h',
75         'src/mojo/public/c/system/system_export.h',
76         'src/mojo/public/c/system/types.h',
77       ],
78     },
79     {
80       # GN version: //mojo/public/cpp/system
81       'target_name': 'mojo_system_cpp_headers',
82       'type': 'none',
83       'sources': [
84         'src/mojo/public/cpp/system/buffer.h',
85         'src/mojo/public/cpp/system/core.h',
86         'src/mojo/public/cpp/system/data_pipe.h',
87         'src/mojo/public/cpp/system/functions.h',
88         'src/mojo/public/cpp/system/handle.h',
89         'src/mojo/public/cpp/system/macros.h',
90         'src/mojo/public/cpp/system/message_pipe.h',
91       ],
92       'dependencies': [
93         'mojo_system_headers',
94       ],
95     },
96     {
97       # GN version: //mojo/public/cpp/bindings
98       'target_name': 'mojo_cpp_bindings',
99       'type': 'static_library',
100       'include_dirs': [
101         '../..'
102       ],
103       'sources': [
104         'src/mojo/public/cpp/bindings/array.h',
105         'src/mojo/public/cpp/bindings/binding.h',
106         'src/mojo/public/cpp/bindings/callback.h',
107         'src/mojo/public/cpp/bindings/interface_ptr.h',
108         'src/mojo/public/cpp/bindings/interface_request.h',
109         'src/mojo/public/cpp/bindings/message.h',
110         'src/mojo/public/cpp/bindings/message_filter.h',
111         'src/mojo/public/cpp/bindings/no_interface.h',
112         'src/mojo/public/cpp/bindings/string.h',
113         'src/mojo/public/cpp/bindings/strong_binding.h',
114         'src/mojo/public/cpp/bindings/type_converter.h',
115         'src/mojo/public/cpp/bindings/lib/array_internal.h',
116         'src/mojo/public/cpp/bindings/lib/array_internal.cc',
117         'src/mojo/public/cpp/bindings/lib/array_serialization.h',
118         'src/mojo/public/cpp/bindings/lib/bindings_internal.h',
119         'src/mojo/public/cpp/bindings/lib/bindings_serialization.cc',
120         'src/mojo/public/cpp/bindings/lib/bindings_serialization.h',
121         'src/mojo/public/cpp/bindings/lib/bounds_checker.cc',
122         'src/mojo/public/cpp/bindings/lib/bounds_checker.h',
123         'src/mojo/public/cpp/bindings/lib/buffer.h',
124         'src/mojo/public/cpp/bindings/lib/callback_internal.h',
125         'src/mojo/public/cpp/bindings/lib/connector.cc',
126         'src/mojo/public/cpp/bindings/lib/connector.h',
127         'src/mojo/public/cpp/bindings/lib/control_message_handler.cc',
128         'src/mojo/public/cpp/bindings/lib/control_message_handler.h',
129         'src/mojo/public/cpp/bindings/lib/control_message_proxy.cc',
130         'src/mojo/public/cpp/bindings/lib/control_message_proxy.h',
131         'src/mojo/public/cpp/bindings/lib/filter_chain.cc',
132         'src/mojo/public/cpp/bindings/lib/filter_chain.h',
133         'src/mojo/public/cpp/bindings/lib/fixed_buffer.cc',
134         'src/mojo/public/cpp/bindings/lib/fixed_buffer.h',
135         'src/mojo/public/cpp/bindings/lib/interface_ptr_internal.h',
136         'src/mojo/public/cpp/bindings/lib/map_data_internal.h',
137         'src/mojo/public/cpp/bindings/lib/map_internal.h',
138         'src/mojo/public/cpp/bindings/lib/map_serialization.h',
139         'src/mojo/public/cpp/bindings/lib/message.cc',
140         'src/mojo/public/cpp/bindings/lib/message_builder.cc',
141         'src/mojo/public/cpp/bindings/lib/message_builder.h',
142         'src/mojo/public/cpp/bindings/lib/message_filter.cc',
143         'src/mojo/public/cpp/bindings/lib/message_header_validator.cc',
144         'src/mojo/public/cpp/bindings/lib/message_header_validator.h',
145         'src/mojo/public/cpp/bindings/lib/message_internal.h',
146         'src/mojo/public/cpp/bindings/lib/no_interface.cc',
147         'src/mojo/public/cpp/bindings/lib/router.cc',
148         'src/mojo/public/cpp/bindings/lib/router.h',
149         'src/mojo/public/cpp/bindings/lib/shared_data.h',
150         'src/mojo/public/cpp/bindings/lib/shared_ptr.h',
151         'src/mojo/public/cpp/bindings/lib/string_serialization.h',
152         'src/mojo/public/cpp/bindings/lib/string_serialization.cc',
153         'src/mojo/public/cpp/bindings/lib/validate_params.h',
154         'src/mojo/public/cpp/bindings/lib/validation_errors.cc',
155         'src/mojo/public/cpp/bindings/lib/validation_errors.h',
156         'src/mojo/public/cpp/bindings/lib/validation_util.cc',
157         'src/mojo/public/cpp/bindings/lib/validation_util.h',
158         # This comes from the mojo_interface_bindings_cpp_sources dependency.
159         '>@(mojom_generated_sources)',
160       ],
161       'dependencies': [
162         'mojo_interface_bindings_cpp_sources',
163       ],
164     },
165     {
166       # GN version: //mojo/public/js
167       'target_name': 'mojo_js_bindings',
168       'type': 'static_library',
169       'include_dirs': [
170         '../..'
171       ],
172       'sources': [
173         'src/mojo/public/js/constants.cc',
174         'src/mojo/public/js/constants.h',
175       ],
176     },
177     {
178       # GN version: //mojo/public/cpp/environment:standalone
179       'target_name': 'mojo_environment_standalone',
180       'type': 'static_library',
181       'sources': [
182         'src/mojo/public/c/environment/async_waiter.h',
183         'src/mojo/public/c/environment/logger.h',
184         'src/mojo/public/cpp/environment/async_waiter.h',
185         'src/mojo/public/cpp/environment/environment.h',
186         'src/mojo/public/cpp/environment/lib/async_waiter.cc',
187         'src/mojo/public/cpp/environment/lib/default_async_waiter.cc',
188         'src/mojo/public/cpp/environment/lib/default_async_waiter.h',
189         'src/mojo/public/cpp/environment/lib/default_logger.cc',
190         'src/mojo/public/cpp/environment/lib/default_logger.h',
191         'src/mojo/public/cpp/environment/lib/default_task_tracker.cc',
192         'src/mojo/public/cpp/environment/lib/default_task_tracker.h',
193         'src/mojo/public/cpp/environment/lib/environment.cc',
194         'src/mojo/public/cpp/environment/lib/logging.cc',
195         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc',
196         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.h',
197         'src/mojo/public/cpp/environment/logging.h',
198         'src/mojo/public/cpp/environment/task_tracker.h',
199       ],
200       'include_dirs': [
201         '../..',
202       ],
203     },
204     {
205       # GN version: //mojo/public/cpp/utility
206       'target_name': 'mojo_utility',
207       'type': 'static_library',
208       'sources': [
209         'src/mojo/public/cpp/utility/mutex.h',
210         'src/mojo/public/cpp/utility/run_loop.h',
211         'src/mojo/public/cpp/utility/run_loop_handler.h',
212         'src/mojo/public/cpp/utility/thread.h',
213         'src/mojo/public/cpp/utility/lib/mutex.cc',
214         'src/mojo/public/cpp/utility/lib/run_loop.cc',
215         'src/mojo/public/cpp/utility/lib/thread.cc',
216         'src/mojo/public/cpp/utility/lib/thread_local.h',
217         'src/mojo/public/cpp/utility/lib/thread_local_posix.cc',
218         'src/mojo/public/cpp/utility/lib/thread_local_win.cc',
219       ],
220       'conditions': [
221         # See crbug.com/342893:
222         ['OS=="win"', {
223           'sources!': [
224             'src/mojo/public/cpp/utility/mutex.h',
225             'src/mojo/public/cpp/utility/thread.h',
226             'src/mojo/public/cpp/utility/lib/mutex.cc',
227             'src/mojo/public/cpp/utility/lib/thread.cc',
228           ],
229         }],
230       ],
231       'include_dirs': [
232         '../..',
233       ],
234     },
235     {
236       'target_name': 'mojo_interface_bindings_mojom',
237       'type': 'none',
238       'variables': {
239         'require_interface_bindings': 0,
240         'mojom_files': [
241           'src/mojo/public/interfaces/bindings/interface_control_messages.mojom',
242         ],
243       },
244       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
245     },
246     {
247       'target_name': 'mojo_interface_bindings_cpp_sources',
248       'type': 'none',
249       'dependencies': [
250         'mojo_interface_bindings_mojom',
251       ],
252     },
253     {
254       # This target can be used to introduce a dependency on interface bindings
255       # generation without introducing any side-effects in the dependent
256       # target's configuration.
257       'target_name': 'mojo_interface_bindings_generation',
258       'type': 'none',
259       'dependencies': [
260         'mojo_interface_bindings_cpp_sources',
261       ],
262     },
263     {
264       # GN version: //mojo/public/c/test_support
265       'target_name': 'mojo_public_test_support',
266       'defines': [
267         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
268       ],
269       'include_dirs': [
270         '../..',
271       ],
272       'direct_dependent_settings': {
273         'include_dirs': [
274           '../..',
275         ],
276       },
277       'sources': [
278         'src/mojo/public/c/test_support/test_support.h',
279         'src/mojo/public/c/test_support/test_support_export.h',
280         # TODO(vtl): Convert this to thunks http://crbug.com/386799
281         'src/mojo/public/tests/test_support_private.cc',
282         'src/mojo/public/tests/test_support_private.h',
283       ],
284       'conditions': [
285         ['OS=="ios"', {
286           'type': 'static_library',
287         }, {
288           'type': 'shared_library',
289         }],
290         ['OS=="mac"', {
291           'xcode_settings': {
292             # Make it a run-path dependent library.
293             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
294           },
295         }],
296       ],
297     },
298     {
299       # GN version: //mojo/public/cpp/test_support:test_utils
300       'target_name': 'mojo_public_test_utils',
301       'type': 'static_library',
302       'dependencies': [
303         '../../base/base.gyp:base',
304         '../../testing/gtest.gyp:gtest',
305         'mojo_public_test_support',
306       ],
307       'sources': [
308         'src/mojo/public/cpp/test_support/lib/test_support.cc',
309         'src/mojo/public/cpp/test_support/lib/test_utils.cc',
310         'src/mojo/public/cpp/test_support/test_utils.h',
311       ],
312     },
313     {
314       # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils
315       'target_name': 'mojo_public_bindings_test_utils',
316       'type': 'static_library',
317       'dependencies': [
318         '../../base/base.gyp:base',
319       ],
320       'sources': [
321         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.cc',
322         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.h',
323       ],
324     },
325     {
326       'target_name': 'mojo_public_test_interfaces_mojom',
327       'type': 'none',
328       'variables': {
329         'mojom_files': [
330           'src/mojo/public/interfaces/bindings/tests/math_calculator.mojom',
331           'src/mojo/public/interfaces/bindings/tests/no_module.mojom',
332           'src/mojo/public/interfaces/bindings/tests/ping_service.mojom',
333           'src/mojo/public/interfaces/bindings/tests/rect.mojom',
334           'src/mojo/public/interfaces/bindings/tests/regression_tests.mojom',
335           'src/mojo/public/interfaces/bindings/tests/sample_factory.mojom',
336           'src/mojo/public/interfaces/bindings/tests/sample_import.mojom',
337           'src/mojo/public/interfaces/bindings/tests/sample_import2.mojom',
338           'src/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom',
339           'src/mojo/public/interfaces/bindings/tests/sample_service.mojom',
340           'src/mojo/public/interfaces/bindings/tests/scoping.mojom',
341           'src/mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom',
342           'src/mojo/public/interfaces/bindings/tests/test_structs.mojom',
343           'src/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom',
344         ],
345       },
346       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
347     },
348     {
349       # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces
350       'target_name': 'mojo_public_test_interfaces',
351       'type': 'static_library',
352       'export_dependent_settings': [
353         'mojo_cpp_bindings',
354       ],
355       'dependencies': [
356         'mojo_public_test_interfaces_mojom',
357         'mojo_cpp_bindings',
358       ],
359     },
360   ],
361   'conditions': [
362     ['OS == "android"', {
363       'targets': [
364         {
365           # GN version: //mojo/public/java:system
366           'target_name': 'mojo_public_java',
367           'type': 'none',
368           'variables': {
369             'chromium_code': 0,
370             'java_in_dir': 'src/mojo/public/java/system',
371           },
372           'includes': [ '../../build/java.gypi' ],
373         },
374         {
375           'target_name': 'mojo_interface_bindings_java_sources',
376           'type': 'none',
377           'dependencies': [
378             'mojo_interface_bindings_mojom',
379           ],
380         },
381         {
382           # GN version: //mojo/public/java:bindings
383           'target_name': 'mojo_bindings_java',
384           'type': 'none',
385           'variables': {
386             'chromium_code': 0,
387             'java_in_dir': 'src/mojo/public/java/bindings',
388            },
389            'dependencies': [
390              'mojo_interface_bindings_java_sources',
391              'mojo_public_java',
392            ],
393            'includes': [ '../../build/java.gypi' ],
394         },
395       ],
396     }],
397   ],