[safe-browsing] Database full hash matches like prefix match.
[chromium-blink-merge.git] / mojo / mojo_public.gypi
blob8f124e720802c2e8c7fcd1722678ea3beedcfc0e
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/core.h',
30         'public/c/system/macros.h',
31         'public/c/system/system_export.h',
32         'public/platform/native/system_thunks.cc',
33         'public/platform/native/system_thunks.h',
34       ],
35     },
36     {
37       'target_name': 'mojo_gles2',
38       'type': 'shared_library',
39       'defines': [
40         'MOJO_GLES2_IMPLEMENTATION',
41         'GLES2_USE_MOJO',
42       ],
43       'include_dirs': [
44         '..',
45       ],
46       'dependencies': [
47         '../third_party/khronos/khronos.gyp:khronos_headers'
48       ],
49       'direct_dependent_settings': {
50         'include_dirs': [
51           '..',
52         ],
53         'defines': [
54           'GLES2_USE_MOJO',
55         ],
56       },
57       'sources': [
58         'public/c/gles2/gles2.h',
59         'public/c/gles2/gles2_export.h',
60         'public/gles2/gles2_private.cc',
61         'public/gles2/gles2_private.h',
62       ],
63       'conditions': [
64         ['OS=="mac"', {
65           'xcode_settings': {
66             # Make it a run-path dependent library.
67             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
68           },
69         }],
70       ],
71     },
72     {
73       'target_name': 'mojo_test_support',
74       'type': 'shared_library',
75       'defines': [
76         'MOJO_TEST_SUPPORT_IMPLEMENTATION',
77       ],
78       'include_dirs': [
79         '..',
80       ],
81       'direct_dependent_settings': {
82         'include_dirs': [
83           '..',
84         ],
85       },
86       'sources': [
87         'public/c/test_support/test_support.h',
88         'public/c/test_support/test_support_export.h',
89         'public/tests/test_support_private.cc',
90         'public/tests/test_support_private.h',
91       ],
92       'conditions': [
93         ['OS=="mac"', {
94           'xcode_settings': {
95             # Make it a run-path dependent library.
96             'DYLIB_INSTALL_NAME_BASE': '@loader_path',
97           },
98         }],
99       ],
100     },
101     {
102       'target_name': 'mojo_public_test_utils',
103       'type': 'static_library',
104       'dependencies': [
105         '../base/base.gyp:base',
106         '../testing/gtest.gyp:gtest',
107         'mojo_test_support',
108       ],
109       'sources': [
110         'public/cpp/test_support/lib/test_utils.cc',
111         'public/cpp/test_support/test_utils.h',
112       ],
113     },
114     # TODO(vtl): Reorganize the mojo_public_*_unittests.
115     {
116       'target_name': 'mojo_public_bindings_unittests',
117       'type': 'executable',
118       'dependencies': [
119         '../testing/gtest.gyp:gtest',
120         'mojo_cpp_bindings',
121         'mojo_environment_standalone',
122         'mojo_public_test_utils',
123         'mojo_run_all_unittests',
124         'mojo_public_test_interfaces',
125         'mojo_utility',
126       ],
127       'sources': [
128         'public/cpp/bindings/tests/array_unittest.cc',
129         'public/cpp/bindings/tests/buffer_unittest.cc',
130         'public/cpp/bindings/tests/connector_unittest.cc',
131         'public/cpp/bindings/tests/handle_passing_unittest.cc',
132         'public/cpp/bindings/tests/remote_ptr_unittest.cc',
133         'public/cpp/bindings/tests/request_response_unittest.cc',
134         'public/cpp/bindings/tests/router_unittest.cc',
135         'public/cpp/bindings/tests/sample_service_unittest.cc',
136         'public/cpp/bindings/tests/type_conversion_unittest.cc',
137       ],
138     },
139     {
140       'target_name': 'mojo_public_environment_unittests',
141       'type': 'executable',
142       'dependencies': [
143         '../base/base.gyp:base',
144         '../testing/gtest.gyp:gtest',
145         'mojo_environment_standalone',
146         'mojo_public_test_utils',
147         'mojo_run_all_unittests',
148         'mojo_utility',
149       ],
150       'sources': [
151         'public/cpp/environment/tests/async_waiter_unittest.cc',
152       ],
153     },
154     {
155       'target_name': 'mojo_public_system_unittests',
156       'type': 'executable',
157       'dependencies': [
158         '../base/base.gyp:base',
159         '../testing/gtest.gyp:gtest',
160         'mojo_cpp_bindings',
161         'mojo_public_test_utils',
162         'mojo_run_all_unittests',
163       ],
164       'sources': [
165         'public/c/system/tests/core_unittest.cc',
166         'public/c/system/tests/core_unittest_pure_c.c',
167         'public/c/system/tests/macros_unittest.cc',
168         'public/cpp/system/tests/core_unittest.cc',
169         'public/cpp/system/tests/macros_unittest.cc',
170       ],
171     },
172     {
173       'target_name': 'mojo_public_utility_unittests',
174       'type': 'executable',
175       'dependencies': [
176         '../base/base.gyp:base',
177         '../testing/gtest.gyp:gtest',
178         'mojo_cpp_bindings',
179         'mojo_public_test_utils',
180         'mojo_run_all_unittests',
181         'mojo_utility',
182       ],
183       'sources': [
184         'public/cpp/utility/tests/mutex_unittest.cc',
185         'public/cpp/utility/tests/run_loop_unittest.cc',
186         'public/cpp/utility/tests/thread_unittest.cc',
187       ],
188       'conditions': [
189         # See crbug.com/342893:
190         ['OS=="win"', {
191           'sources!': [
192             'public/cpp/utility/tests/mutex_unittest.cc',
193             'public/cpp/utility/tests/thread_unittest.cc',
194           ],
195         }],
196       ],
197     },
198     {
199       'target_name': 'mojo_public_system_perftests',
200       'type': 'executable',
201       'dependencies': [
202         '../base/base.gyp:base',
203         '../testing/gtest.gyp:gtest',
204         'mojo_public_test_utils',
205         'mojo_run_all_perftests',
206         'mojo_utility',
207       ],
208       'sources': [
209         'public/c/system/tests/core_perftest.cc',
210       ],
211     },
212     {
213       'target_name': 'mojo_cpp_bindings',
214       'type': 'static_library',
215       'include_dirs': [
216         '..'
217       ],
218       'sources': [
219         'public/cpp/bindings/allocation_scope.h',
220         'public/cpp/bindings/array.h',
221         'public/cpp/bindings/buffer.h',
222         'public/cpp/bindings/callback.h',
223         'public/cpp/bindings/error_handler.h',
224         'public/cpp/bindings/interface.h',
225         'public/cpp/bindings/message.h',
226         'public/cpp/bindings/passable.h',
227         'public/cpp/bindings/remote_ptr.h',
228         'public/cpp/bindings/sync_dispatcher.h',
229         'public/cpp/bindings/type_converter.h',
230         'public/cpp/bindings/lib/array.cc',
231         'public/cpp/bindings/lib/array_internal.h',
232         'public/cpp/bindings/lib/array_internal.cc',
233         'public/cpp/bindings/lib/bindings_internal.h',
234         'public/cpp/bindings/lib/bindings_serialization.cc',
235         'public/cpp/bindings/lib/bindings_serialization.h',
236         'public/cpp/bindings/lib/buffer.cc',
237         'public/cpp/bindings/lib/callback_internal.h',
238         'public/cpp/bindings/lib/connector.cc',
239         'public/cpp/bindings/lib/connector.h',
240         'public/cpp/bindings/lib/fixed_buffer.cc',
241         'public/cpp/bindings/lib/fixed_buffer.h',
242         'public/cpp/bindings/lib/interface.cc',
243         'public/cpp/bindings/lib/message.cc',
244         'public/cpp/bindings/lib/message_builder.cc',
245         'public/cpp/bindings/lib/message_builder.h',
246         'public/cpp/bindings/lib/message_internal.h',
247         'public/cpp/bindings/lib/message_queue.cc',
248         'public/cpp/bindings/lib/message_queue.h',
249         'public/cpp/bindings/lib/router.cc',
250         'public/cpp/bindings/lib/router.h',
251         'public/cpp/bindings/lib/scratch_buffer.cc',
252         'public/cpp/bindings/lib/scratch_buffer.h',
253         'public/cpp/bindings/lib/shared_data.h',
254         'public/cpp/bindings/lib/shared_ptr.h',
255         'public/cpp/bindings/lib/sync_dispatcher.cc',
256       ],
257     },
258     {
259       'target_name': 'mojo_js_bindings',
260       'type': 'static_library',
261       'include_dirs': [
262         '..'
263       ],
264       'sources': [
265         'public/js/bindings/constants.cc',
266         'public/js/bindings/constants.h',
267       ],
268     },
269     {
270       'target_name': 'mojo_public_test_interfaces',
271       'type': 'static_library',
272       'sources': [
273         'public/interfaces/bindings/tests/math_calculator.mojom',
274         'public/interfaces/bindings/tests/sample_factory.mojom',
275         'public/interfaces/bindings/tests/sample_import.mojom',
276         'public/interfaces/bindings/tests/sample_import2.mojom',
277         'public/interfaces/bindings/tests/sample_interfaces.mojom',
278         'public/interfaces/bindings/tests/sample_service.mojom',
279         'public/interfaces/bindings/tests/test_structs.mojom',
280       ],
281       'variables': {
282         'mojom_base_output_dir': 'mojo',
283       },
284       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
285       'export_dependent_settings': [
286         'mojo_cpp_bindings',
287       ],
288       'dependencies': [
289         'mojo_cpp_bindings',
290       ],
291     },
292     {
293       'target_name': 'mojo_environment_standalone',
294       'type': 'static_library',
295       'sources': [
296         'public/cpp/environment/buffer_tls.h',
297         'public/cpp/environment/default_async_waiter.h',
298         'public/cpp/environment/environment.h',
299         'public/cpp/environment/lib/default_async_waiter.cc',
300         'public/cpp/environment/lib/buffer_tls.cc',
301         'public/cpp/environment/lib/buffer_tls_setup.h',
302         'public/cpp/environment/lib/environment.cc',
303       ],
304       'include_dirs': [
305         '..',
306       ],
307     },
308     {
309       'target_name': 'mojo_utility',
310       'type': 'static_library',
311       'sources': [
312         'public/cpp/utility/mutex.h',
313         'public/cpp/utility/run_loop.h',
314         'public/cpp/utility/run_loop_handler.h',
315         'public/cpp/utility/thread.h',
316         'public/cpp/utility/lib/mutex.cc',
317         'public/cpp/utility/lib/run_loop.cc',
318         'public/cpp/utility/lib/thread.cc',
319         'public/cpp/utility/lib/thread_local.h',
320         'public/cpp/utility/lib/thread_local_posix.cc',
321         'public/cpp/utility/lib/thread_local_win.cc',
322       ],
323       'conditions': [
324         # See crbug.com/342893:
325         ['OS=="win"', {
326           'sources!': [
327             'public/cpp/utility/mutex.h',
328             'public/cpp/utility/thread.h',
329             'public/cpp/utility/lib/mutex.cc',
330             'public/cpp/utility/lib/thread.cc',
331           ],
332         }],
333       ],
334       'include_dirs': [
335         '..',
336       ],
337     },
338     {
339       'target_name': 'mojo_shell_bindings',
340       'type': 'static_library',
341       'sources': [
342         'public/interfaces/shell/shell.mojom',
343       ],
344       'variables': {
345         'mojom_base_output_dir': 'mojo',
346       },
347       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
348       'dependencies': [
349         'mojo_cpp_bindings',
350       ],
351       'export_dependent_settings': [
352         'mojo_cpp_bindings',
353       ],
354     },
355     {
356       'target_name': 'mojo_shell_client',
357       'type': 'static_library',
358       'sources': [
359         'public/cpp/shell/application.h',
360         'public/cpp/shell/service.h',
361         'public/cpp/shell/lib/application.cc',
362         'public/cpp/shell/lib/service.cc',
363       ],
364       'dependencies': [
365         'mojo_shell_bindings',
366       ],
367       'export_dependent_settings': [
368         'mojo_shell_bindings',
369       ],
370     },
371   ],
372   'conditions': [
373     ['OS == "android"', {
374       'targets': [
375         {
376           'target_name': 'mojo_public_java',
377           'type': 'none',
378           'variables': {
379             'java_in_dir': 'public/java',
380           },
381           'includes': [ '../build/java.gypi' ],
382         },
383       ],
384     }],
385   ],