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.
5 # Essential components (and their tests) that are needed to build
6 # Chrome should be here. Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
11 'mojo_public_tests.gypi',
12 'mojo_variables.gypi',
16 'target_name': 'mojo_base',
20 'mojo_common_unittests',
24 'mojo_message_generator',
25 'mojo_public_application_unittests',
26 'mojo_public_test_utils',
27 'mojo_public_bindings_unittests',
28 'mojo_public_environment_unittests',
29 'mojo_public_system_perftests',
30 'mojo_public_system_unittests',
31 'mojo_public_utility_unittests',
34 'mojo_system_unittests',
43 'libmojo_system_java',
50 'target_name': 'mojo_none',
54 'target_name': 'mojo_run_all_unittests',
55 'type': 'static_library',
57 '../base/base.gyp:base',
58 '../base/base.gyp:test_support_base',
59 '../testing/gtest.gyp:gtest',
62 'mojo_test_support_impl',
65 'common/test/run_all_unittests.cc',
69 'target_name': 'mojo_run_all_perftests',
70 'type': 'static_library',
72 '../base/base.gyp:test_support_base',
75 'mojo_test_support_impl',
78 'common/test/run_all_perftests.cc',
82 # GN version: //mojo/system
83 'target_name': 'mojo_system_impl',
84 'type': '<(component)',
86 '../base/base.gyp:base',
87 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
90 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
91 'MOJO_SYSTEM_IMPLEMENTATION',
92 'MOJO_USE_SYSTEM_IMPL',
95 'embedder/channel_init.cc',
96 'embedder/channel_init.h',
97 'embedder/embedder.cc',
98 'embedder/embedder.h',
99 'embedder/platform_channel_pair.cc',
100 'embedder/platform_channel_pair.h',
101 'embedder/platform_channel_pair_posix.cc',
102 'embedder/platform_channel_pair_win.cc',
103 'embedder/platform_channel_utils_posix.cc',
104 'embedder/platform_channel_utils_posix.h',
105 'embedder/platform_handle.cc',
106 'embedder/platform_handle.h',
107 'embedder/platform_handle_utils.h',
108 'embedder/platform_handle_utils_posix.cc',
109 'embedder/platform_handle_utils_win.cc',
110 'embedder/platform_handle_vector.h',
111 'embedder/platform_shared_buffer.h',
112 'embedder/platform_support.h',
113 'embedder/scoped_platform_handle.h',
114 'embedder/simple_platform_shared_buffer.cc',
115 'embedder/simple_platform_shared_buffer.h',
116 'embedder/simple_platform_shared_buffer_posix.cc',
117 'embedder/simple_platform_shared_buffer_win.cc',
118 'embedder/simple_platform_support.cc',
119 'embedder/simple_platform_support.h',
122 'system/constants.h',
125 'system/data_pipe.cc',
126 'system/data_pipe.h',
127 'system/data_pipe_consumer_dispatcher.cc',
128 'system/data_pipe_consumer_dispatcher.h',
129 'system/data_pipe_producer_dispatcher.cc',
130 'system/data_pipe_producer_dispatcher.h',
131 'system/dispatcher.cc',
132 'system/dispatcher.h',
133 'system/entrypoints.cc',
134 'system/handle_signals_state.h',
135 'system/handle_table.cc',
136 'system/handle_table.h',
137 'system/local_data_pipe.cc',
138 'system/local_data_pipe.h',
139 'system/local_message_pipe_endpoint.cc',
140 'system/local_message_pipe_endpoint.h',
141 'system/mapping_table.cc',
142 'system/mapping_table.h',
145 'system/message_in_transit.cc',
146 'system/message_in_transit.h',
147 'system/message_in_transit_queue.cc',
148 'system/message_in_transit_queue.h',
149 'system/message_pipe.cc',
150 'system/message_pipe.h',
151 'system/message_pipe_dispatcher.cc',
152 'system/message_pipe_dispatcher.h',
153 'system/message_pipe_endpoint.cc',
154 'system/message_pipe_endpoint.h',
155 'system/options_validation.h',
156 'system/platform_handle_dispatcher.cc',
157 'system/platform_handle_dispatcher.h',
158 'system/proxy_message_pipe_endpoint.cc',
159 'system/proxy_message_pipe_endpoint.h',
160 'system/raw_channel.cc',
161 'system/raw_channel.h',
162 'system/raw_channel_posix.cc',
163 'system/raw_channel_win.cc',
164 'system/shared_buffer_dispatcher.cc',
165 'system/shared_buffer_dispatcher.h',
166 'system/simple_dispatcher.cc',
167 'system/simple_dispatcher.h',
168 'system/transport_data.cc',
169 'system/transport_data.h',
172 'system/waiter_list.cc',
173 'system/waiter_list.h',
175 # TODO(vtl): It's a little unfortunate that these end up in the same
176 # component as non-test-only code. In the static build, this code should
177 # hopefully be dead-stripped.
178 'embedder/test_embedder.cc',
179 'embedder/test_embedder.h',
181 'all_dependent_settings': {
182 # Ensures that dependent projects import the core functions on Windows.
183 'defines': ['MOJO_USE_SYSTEM_IMPL'],
187 'target_name': 'mojo_system_unittests',
188 'type': 'executable',
190 '../base/base.gyp:base',
191 '../testing/gtest.gyp:gtest',
192 'mojo_common_test_support',
196 'embedder/embedder_unittest.cc',
197 'embedder/platform_channel_pair_posix_unittest.cc',
198 'embedder/simple_platform_shared_buffer_unittest.cc',
199 'system/channel_unittest.cc',
200 'system/core_unittest.cc',
201 'system/core_test_base.cc',
202 'system/core_test_base.h',
203 'system/data_pipe_unittest.cc',
204 'system/dispatcher_unittest.cc',
205 'system/local_data_pipe_unittest.cc',
206 'system/memory_unittest.cc',
207 'system/message_pipe_dispatcher_unittest.cc',
208 'system/message_pipe_unittest.cc',
209 'system/multiprocess_message_pipe_unittest.cc',
210 'system/options_validation_unittest.cc',
211 'system/platform_handle_dispatcher_unittest.cc',
212 'system/raw_channel_unittest.cc',
213 'system/remote_message_pipe_unittest.cc',
214 'system/run_all_unittests.cc',
215 'system/shared_buffer_dispatcher_unittest.cc',
216 'system/simple_dispatcher_unittest.cc',
217 'system/test_utils.cc',
218 'system/test_utils.h',
219 'system/waiter_list_unittest.cc',
220 'system/waiter_test_utils.cc',
221 'system/waiter_test_utils.h',
222 'system/waiter_unittest.cc',
226 'target_name': 'mojo_test_support_impl',
227 'type': 'static_library',
229 '../base/base.gyp:base',
232 'common/test/test_support_impl.cc',
233 'common/test/test_support_impl.h',
237 # GN version: //mojo/common
238 'target_name': 'mojo_common_lib',
239 'type': '<(component)',
241 'MOJO_COMMON_IMPLEMENTATION',
244 '../base/base.gyp:base',
245 '../url/url.gyp:url_lib',
246 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
247 '<(mojo_system_for_component)',
249 'export_dependent_settings': [
250 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
253 'common/common_type_converters.cc',
254 'common/common_type_converters.h',
255 'common/data_pipe_utils.cc',
256 'common/data_pipe_utils.h',
257 'common/handle_watcher.cc',
258 'common/handle_watcher.h',
259 'common/message_pump_mojo.cc',
260 'common/message_pump_mojo.h',
261 'common/message_pump_mojo_handler.h',
262 'common/time_helper.cc',
263 'common/time_helper.h',
267 'target_name': 'mojo_common_test_support',
268 'type': 'static_library',
270 '../base/base.gyp:base',
271 '../base/base.gyp:test_support_base',
272 '../testing/gtest.gyp:gtest',
276 'common/test/multiprocess_test_helper.cc',
277 'common/test/multiprocess_test_helper.h',
278 'common/test/test_utils.h',
279 'common/test/test_utils_posix.cc',
280 'common/test/test_utils_win.cc',
284 'target_name': 'mojo_common_unittests',
285 'type': 'executable',
287 '../base/base.gyp:base',
288 '../base/base.gyp:base_message_loop_tests',
289 '../testing/gtest.gyp:gtest',
290 '../url/url.gyp:url_lib',
292 'mojo_environment_chromium',
294 'mojo_common_test_support',
295 'mojo_public_test_utils',
296 'mojo_run_all_unittests',
299 'common/common_type_converters_unittest.cc',
300 'common/handle_watcher_unittest.cc',
301 'common/message_pump_mojo_unittest.cc',
302 'common/test/multiprocess_test_helper_unittest.cc',
306 # GN version: //mojo/environment:chromium
307 'target_name': 'mojo_environment_chromium',
308 'type': 'static_library',
310 'mojo_environment_chromium_impl',
313 'environment/environment.cc',
314 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
315 "public/cpp/environment/logging.h",
316 "public/cpp/environment/lib/logging.cc",
321 'export_dependent_settings': [
322 'mojo_environment_chromium_impl',
326 # GN version: //mojo/environment:chromium_impl
327 'target_name': 'mojo_environment_chromium_impl',
328 'type': '<(component)',
330 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
333 '../base/base.gyp:base',
334 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
336 '<(mojo_system_for_component)',
339 'environment/default_async_waiter_impl.cc',
340 'environment/default_async_waiter_impl.h',
341 'environment/default_logger_impl.cc',
342 'environment/default_logger_impl.h',
349 # GN version: //mojo/services/gles2:interfaces (for files generated from
351 # GN version: //mojo/services/gles2:bindings
352 'target_name': 'mojo_gles2_bindings',
353 'type': 'static_library',
355 'services/gles2/command_buffer.mojom',
356 'services/gles2/command_buffer_type_conversions.cc',
357 'services/gles2/command_buffer_type_conversions.h',
358 'services/gles2/mojo_buffer_backing.cc',
359 'services/gles2/mojo_buffer_backing.h',
361 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
362 'export_dependent_settings': [
367 '../gpu/gpu.gyp:command_buffer_common',
371 # GN version: //mojo/gles2
372 'target_name': 'mojo_gles2_impl',
373 'type': '<(component)',
375 '../base/base.gyp:base',
376 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
377 '../gpu/gpu.gyp:command_buffer_client',
378 '../gpu/gpu.gyp:command_buffer_common',
379 '../gpu/gpu.gyp:gles2_cmd_helper',
380 '../gpu/gpu.gyp:gles2_implementation',
381 'mojo_environment_chromium',
382 'mojo_gles2_bindings',
383 '<(mojo_system_for_component)',
387 'GL_GLEXT_PROTOTYPES',
388 'MOJO_GLES2_IMPLEMENTATION',
389 'MOJO_GLES2_IMPL_IMPLEMENTATION',
390 'MOJO_USE_GLES2_IMPL'
392 'direct_dependent_settings': {
398 'gles2/command_buffer_client_impl.cc',
399 'gles2/command_buffer_client_impl.h',
400 'gles2/gles2_impl_export.h',
401 'gles2/gles2_impl.cc',
402 'gles2/gles2_context.cc',
403 'gles2/gles2_context.h',
405 'all_dependent_settings': {
406 # Ensures that dependent projects import the core functions on Windows.
407 'defines': ['MOJO_USE_GLES2_IMPL'],
411 'target_name': 'mojo_application_chromium',
412 'type': 'static_library',
414 'public/cpp/application/lib/application_impl_chromium.cc',
417 'mojo_application_base',
419 'export_dependent_settings': [
420 'mojo_application_base',
424 # GN version: //mojo/bindings/js
425 'target_name': 'mojo_js_bindings_lib',
426 'type': 'static_library',
428 '../base/base.gyp:base',
429 '../gin/gin.gyp:gin',
430 '../v8/tools/gyp/v8.gyp:v8',
433 'export_dependent_settings': [
434 '../base/base.gyp:base',
435 '../gin/gin.gyp:gin',
439 # Sources list duplicated in GN build.
440 'bindings/js/core.cc',
441 'bindings/js/core.h',
442 'bindings/js/handle.cc',
443 'bindings/js/handle.h',
444 'bindings/js/support.cc',
445 'bindings/js/support.h',
446 'bindings/js/waiting_callback.cc',
447 'bindings/js/waiting_callback.h',
451 'target_name': 'mojo_message_generator',
452 'type': 'executable',
454 '../base/base.gyp:base',
455 '../testing/gtest.gyp:gtest',
458 'mojo_environment_chromium',
462 'tools/message_generator.cc',
470 'target_name': 'mojo_jni_headers',
473 'mojo_java_set_jni_headers',
476 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
477 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
478 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
479 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
482 'jni_gen_package': 'mojo',
484 'includes': [ '../build/jni_generator.gypi' ],
487 'target_name': 'mojo_java_set_jni_headers',
490 'jni_gen_package': 'mojo',
491 'input_java_class': 'java/util/HashSet.class',
493 'includes': [ '../build/jar_file_jni_generator.gypi' ],
496 'target_name': 'mojo_system_java',
499 '../base/base.gyp:base_java',
503 'java_in_dir': '<(DEPTH)/mojo/android/system',
505 'includes': [ '../build/java.gypi' ],
508 'target_name': 'libmojo_system_java',
509 'type': 'static_library',
511 '../base/base.gyp:base',
512 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
514 'mojo_environment_chromium',
519 'android/system/core_impl.cc',
520 'android/system/core_impl.h',
524 'target_name': 'libmojo_java_unittest',
525 'type': 'shared_library',
527 '../base/base.gyp:base',
528 '../base/base.gyp:test_support_base',
529 'libmojo_system_java',
533 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
536 'android/javatests/mojo_test_case.cc',
537 'android/javatests/mojo_test_case.h',
538 'android/javatests/init_library.cc',
542 'target_name': 'mojo_test_apk',
545 'mojo_bindings_java',
546 'mojo_public_test_interfaces',
548 '../base/base.gyp:base_java_test_support',
551 'apk_name': 'MojoTest',
552 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
553 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
554 'native_lib_target': 'libmojo_java_unittest',
556 # Given that this apk tests itself, it needs to bring emma with it
559 ['emma_coverage != 0', {
560 'emma_instrument': 1,
564 'includes': [ '../build/java_apk.gypi' ],
568 ['test_isolation_mode != "noop"', {
571 'target_name': 'mojo_js_unittests_run',
577 '../build/isolate.gypi',
578 'mojo_js_unittests.isolate',
581 'mojo_js_unittests.isolate',