[MacViews] Show comboboxes with a native NSMenu
[chromium-blink-merge.git] / third_party / mojo / mojo_public.gyp
blob5efac663646065c0fa56e72f21a287f6e49520c9
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_impl.h',
108         'src/mojo/public/cpp/bindings/interface_ptr.h',
109         'src/mojo/public/cpp/bindings/interface_request.h',
110         'src/mojo/public/cpp/bindings/message.h',
111         'src/mojo/public/cpp/bindings/message_filter.h',
112         'src/mojo/public/cpp/bindings/no_interface.h',
113         'src/mojo/public/cpp/bindings/string.h',
114         'src/mojo/public/cpp/bindings/strong_binding.h',
115         'src/mojo/public/cpp/bindings/type_converter.h',
116         'src/mojo/public/cpp/bindings/lib/array_internal.h',
117         'src/mojo/public/cpp/bindings/lib/array_internal.cc',
118         'src/mojo/public/cpp/bindings/lib/array_serialization.h',
119         'src/mojo/public/cpp/bindings/lib/bindings_internal.h',
120         'src/mojo/public/cpp/bindings/lib/bindings_serialization.cc',
121         'src/mojo/public/cpp/bindings/lib/bindings_serialization.h',
122         'src/mojo/public/cpp/bindings/lib/bounds_checker.cc',
123         'src/mojo/public/cpp/bindings/lib/bounds_checker.h',
124         'src/mojo/public/cpp/bindings/lib/buffer.h',
125         'src/mojo/public/cpp/bindings/lib/callback_internal.h',
126         'src/mojo/public/cpp/bindings/lib/connector.cc',
127         'src/mojo/public/cpp/bindings/lib/connector.h',
128         'src/mojo/public/cpp/bindings/lib/control_message_handler.cc',
129         'src/mojo/public/cpp/bindings/lib/control_message_handler.h',
130         'src/mojo/public/cpp/bindings/lib/control_message_proxy.cc',
131         'src/mojo/public/cpp/bindings/lib/control_message_proxy.h',
132         'src/mojo/public/cpp/bindings/lib/filter_chain.cc',
133         'src/mojo/public/cpp/bindings/lib/filter_chain.h',
134         'src/mojo/public/cpp/bindings/lib/fixed_buffer.cc',
135         'src/mojo/public/cpp/bindings/lib/fixed_buffer.h',
136         'src/mojo/public/cpp/bindings/lib/interface_ptr_internal.h',
137         'src/mojo/public/cpp/bindings/lib/map_data_internal.h',
138         'src/mojo/public/cpp/bindings/lib/map_internal.h',
139         'src/mojo/public/cpp/bindings/lib/map_serialization.h',
140         'src/mojo/public/cpp/bindings/lib/message.cc',
141         'src/mojo/public/cpp/bindings/lib/message_builder.cc',
142         'src/mojo/public/cpp/bindings/lib/message_builder.h',
143         'src/mojo/public/cpp/bindings/lib/message_filter.cc',
144         'src/mojo/public/cpp/bindings/lib/message_header_validator.cc',
145         'src/mojo/public/cpp/bindings/lib/message_header_validator.h',
146         'src/mojo/public/cpp/bindings/lib/message_internal.h',
147         'src/mojo/public/cpp/bindings/lib/no_interface.cc',
148         'src/mojo/public/cpp/bindings/lib/router.cc',
149         'src/mojo/public/cpp/bindings/lib/router.h',
150         'src/mojo/public/cpp/bindings/lib/shared_data.h',
151         'src/mojo/public/cpp/bindings/lib/shared_ptr.h',
152         'src/mojo/public/cpp/bindings/lib/string_serialization.h',
153         'src/mojo/public/cpp/bindings/lib/string_serialization.cc',
154         'src/mojo/public/cpp/bindings/lib/validate_params.h',
155         'src/mojo/public/cpp/bindings/lib/validation_errors.cc',
156         'src/mojo/public/cpp/bindings/lib/validation_errors.h',
157         'src/mojo/public/cpp/bindings/lib/validation_util.cc',
158         'src/mojo/public/cpp/bindings/lib/validation_util.h',
159         # This comes from the mojo_interface_bindings_cpp_sources dependency.
160         '>@(mojom_generated_sources)',
161       ],
162       'dependencies': [
163         'mojo_interface_bindings_cpp_sources',
164       ],
165     },
166     {
167       # GN version: //mojo/public/js
168       'target_name': 'mojo_js_bindings',
169       'type': 'static_library',
170       'include_dirs': [
171         '../..'
172       ],
173       'sources': [
174         'src/mojo/public/js/constants.cc',
175         'src/mojo/public/js/constants.h',
176       ],
177     },
178     {
179       # GN version: //mojo/public/cpp/environment:standalone
180       'target_name': 'mojo_environment_standalone',
181       'type': 'static_library',
182       'sources': [
183         'src/mojo/public/c/environment/async_waiter.h',
184         'src/mojo/public/c/environment/logger.h',
185         'src/mojo/public/cpp/environment/async_waiter.h',
186         'src/mojo/public/cpp/environment/environment.h',
187         'src/mojo/public/cpp/environment/lib/async_waiter.cc',
188         'src/mojo/public/cpp/environment/lib/default_async_waiter.cc',
189         'src/mojo/public/cpp/environment/lib/default_async_waiter.h',
190         'src/mojo/public/cpp/environment/lib/default_logger.cc',
191         'src/mojo/public/cpp/environment/lib/default_logger.h',
192         'src/mojo/public/cpp/environment/lib/default_task_tracker.cc',
193         'src/mojo/public/cpp/environment/lib/default_task_tracker.h',
194         'src/mojo/public/cpp/environment/lib/environment.cc',
195         'src/mojo/public/cpp/environment/lib/logging.cc',
196         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc',
197         'src/mojo/public/cpp/environment/lib/scoped_task_tracking.h',
198         'src/mojo/public/cpp/environment/logging.h',
199         'src/mojo/public/cpp/environment/task_tracker.h',
200       ],
201       'include_dirs': [
202         '../..',
203       ],
204     },
205     {
206       # GN version: //mojo/public/cpp/utility
207       'target_name': 'mojo_utility',
208       'type': 'static_library',
209       'sources': [
210         'src/mojo/public/cpp/utility/mutex.h',
211         'src/mojo/public/cpp/utility/run_loop.h',
212         'src/mojo/public/cpp/utility/run_loop_handler.h',
213         'src/mojo/public/cpp/utility/thread.h',
214         'src/mojo/public/cpp/utility/lib/mutex.cc',
215         'src/mojo/public/cpp/utility/lib/run_loop.cc',
216         'src/mojo/public/cpp/utility/lib/thread.cc',
217         'src/mojo/public/cpp/utility/lib/thread_local.h',
218         'src/mojo/public/cpp/utility/lib/thread_local_posix.cc',
219         'src/mojo/public/cpp/utility/lib/thread_local_win.cc',
220       ],
221       'conditions': [
222         # See crbug.com/342893:
223         ['OS=="win"', {
224           'sources!': [
225             'src/mojo/public/cpp/utility/mutex.h',
226             'src/mojo/public/cpp/utility/thread.h',
227             'src/mojo/public/cpp/utility/lib/mutex.cc',
228             'src/mojo/public/cpp/utility/lib/thread.cc',
229           ],
230         }],
231       ],
232       'include_dirs': [
233         '../..',
234       ],
235     },
236     {
237       'target_name': 'mojo_interface_bindings_mojom',
238       'type': 'none',
239       'variables': {
240         'require_interface_bindings': 0,
241         'mojom_files': [
242           'src/mojo/public/interfaces/bindings/interface_control_messages.mojom',
243         ],
244       },
245       'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
246     },
247     {
248       'target_name': 'mojo_interface_bindings_cpp_sources',
249       'type': 'none',
250       'dependencies': [
251         'mojo_interface_bindings_mojom',
252       ],
253     },
254     {
255       # This target can be used to introduce a dependency on interface bindings
256       # generation without introducing any side-effects in the dependent
257       # target's configuration.
258       'target_name': 'mojo_interface_bindings_generation',
259       'type': 'none',
260       'dependencies': [
261         'mojo_interface_bindings_cpp_sources',
262       ],
263     },
264     {
265       # GN version: //mojo/public/c/test_support
266       'target_name': 'mojo_public_test_support',
267       'defines': [
268         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
269       ],
270       'include_dirs': [
271         '../..',
272       ],
273       'direct_dependent_settings': {
274         'include_dirs': [
275           '../..',
276         ],
277       },
278       'sources': [
279         'src/mojo/public/c/test_support/test_support.h',
280         'src/mojo/public/c/test_support/test_support_export.h',
281         # TODO(vtl): Convert this to thunks http://crbug.com/386799
282         'src/mojo/public/tests/test_support_private.cc',
283         'src/mojo/public/tests/test_support_private.h',
284       ],
285       'conditions': [
286         ['OS=="ios"', {
287           'type': 'static_library',
288         }, {
289           'type': 'shared_library',
290         }],
291         ['OS=="mac"', {
292           'xcode_settings': {
293             # Make it a run-path dependent library.
294             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
295           },
296         }],
297       ],
298     },
299     {
300       # GN version: //mojo/public/cpp/test_support:test_utils
301       'target_name': 'mojo_public_test_utils',
302       'type': 'static_library',
303       'dependencies': [
304         '../../base/base.gyp:base',
305         '../../testing/gtest.gyp:gtest',
306         'mojo_public_test_support',
307       ],
308       'sources': [
309         'src/mojo/public/cpp/test_support/lib/test_support.cc',
310         'src/mojo/public/cpp/test_support/lib/test_utils.cc',
311         'src/mojo/public/cpp/test_support/test_utils.h',
312       ],
313     },
314     {
315       # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils
316       'target_name': 'mojo_public_bindings_test_utils',
317       'type': 'static_library',
318       'dependencies': [
319         '../../base/base.gyp:base',
320       ],
321       'sources': [
322         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.cc',
323         'src/mojo/public/cpp/bindings/tests/validation_test_input_parser.h',
324       ],
325     },
326     {
327       'target_name': 'mojo_public_test_interfaces_mojom',
328       'type': 'none',
329       'variables': {
330         'mojom_files': [
331           'src/mojo/public/interfaces/bindings/tests/math_calculator.mojom',
332           'src/mojo/public/interfaces/bindings/tests/no_module.mojom',
333           'src/mojo/public/interfaces/bindings/tests/ping_service.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/sample_factory.mojom',
337           'src/mojo/public/interfaces/bindings/tests/sample_import.mojom',
338           'src/mojo/public/interfaces/bindings/tests/sample_import2.mojom',
339           'src/mojo/public/interfaces/bindings/tests/sample_interfaces.mojom',
340           'src/mojo/public/interfaces/bindings/tests/sample_service.mojom',
341           'src/mojo/public/interfaces/bindings/tests/scoping.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             'chromium_code': 0,
371             'java_in_dir': 'src/mojo/public/java/system',
372           },
373           'includes': [ '../../build/java.gypi' ],
374         },
375         {
376           'target_name': 'mojo_interface_bindings_java_sources',
377           'type': 'none',
378           'dependencies': [
379             'mojo_interface_bindings_mojom',
380           ],
381         },
382         {
383           # GN version: //mojo/public/java:bindings
384           'target_name': 'mojo_bindings_java',
385           'type': 'none',
386           'variables': {
387             'chromium_code': 0,
388             'java_in_dir': 'src/mojo/public/java/bindings',
389            },
390            'dependencies': [
391              'mojo_interface_bindings_java_sources',
392              'mojo_public_java',
393            ],
394            'includes': [ '../../build/java.gypi' ],
395         },
396       ],
397     }],
398   ],