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',
19 # NOTE: If adding a new dependency here, please consider whether it
20 # should also be added to the list of Mojo-related dependencies of
21 # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
22 # target on iOS due to the presence of the js targets, which cause v8
25 'mojo_common_unittests',
28 'mojo_message_generator',
29 'mojo_message_pipe_perftests',
30 'mojo_public_application_unittests',
31 'mojo_public_test_utils',
32 'mojo_public_bindings_unittests',
33 'mojo_public_environment_unittests',
34 'mojo_public_system_perftests',
35 'mojo_public_system_unittests',
36 'mojo_public_utility_unittests',
39 'mojo_system_unittests',
48 'libmojo_system_java',
55 'target_name': 'mojo_none',
59 # GN version: //mojo/common/test:run_all_unittests
60 'target_name': 'mojo_run_all_unittests',
61 'type': 'static_library',
63 '../base/base.gyp:base',
64 '../base/base.gyp:test_support_base',
65 '../testing/gtest.gyp:gtest',
68 'mojo_test_support_impl',
71 'common/test/run_all_unittests.cc',
75 # GN version: //mojo/common/test:run_all_perftests
76 'target_name': 'mojo_run_all_perftests',
77 'type': 'static_library',
79 '../base/base.gyp:test_support_base',
82 'mojo_test_support_impl',
85 'common/test/run_all_perftests.cc',
89 # GN version: //mojo/edk/system
90 'target_name': 'mojo_system_impl',
91 'type': '<(component)',
93 '../base/base.gyp:base',
94 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
97 'MOJO_SYSTEM_IMPL_IMPLEMENTATION',
98 'MOJO_SYSTEM_IMPLEMENTATION',
99 'MOJO_USE_SYSTEM_IMPL',
102 'edk/embedder/channel_init.cc',
103 'edk/embedder/channel_init.h',
104 'edk/embedder/embedder.cc',
105 'edk/embedder/embedder.h',
106 'edk/embedder/platform_channel_pair.cc',
107 'edk/embedder/platform_channel_pair.h',
108 'edk/embedder/platform_channel_pair_posix.cc',
109 'edk/embedder/platform_channel_pair_win.cc',
110 'edk/embedder/platform_channel_utils_posix.cc',
111 'edk/embedder/platform_channel_utils_posix.h',
112 'edk/embedder/platform_handle.cc',
113 'edk/embedder/platform_handle.h',
114 'edk/embedder/platform_handle_utils.h',
115 'edk/embedder/platform_handle_utils_posix.cc',
116 'edk/embedder/platform_handle_utils_win.cc',
117 'edk/embedder/platform_handle_vector.h',
118 'edk/embedder/platform_shared_buffer.h',
119 'edk/embedder/platform_support.h',
120 'edk/embedder/scoped_platform_handle.h',
121 'edk/embedder/simple_platform_shared_buffer.cc',
122 'edk/embedder/simple_platform_shared_buffer.h',
123 'edk/embedder/simple_platform_shared_buffer_posix.cc',
124 'edk/embedder/simple_platform_shared_buffer_win.cc',
125 'edk/embedder/simple_platform_support.cc',
126 'edk/embedder/simple_platform_support.h',
127 'edk/system/channel.cc',
128 'edk/system/channel.h',
129 'edk/system/channel_endpoint.cc',
130 'edk/system/channel_endpoint.h',
131 'edk/system/constants.h',
132 'edk/system/core.cc',
134 'edk/system/data_pipe.cc',
135 'edk/system/data_pipe.h',
136 'edk/system/data_pipe_consumer_dispatcher.cc',
137 'edk/system/data_pipe_consumer_dispatcher.h',
138 'edk/system/data_pipe_producer_dispatcher.cc',
139 'edk/system/data_pipe_producer_dispatcher.h',
140 'edk/system/dispatcher.cc',
141 'edk/system/dispatcher.h',
142 'edk/system/entrypoints.cc',
143 'edk/system/handle_signals_state.h',
144 'edk/system/handle_table.cc',
145 'edk/system/handle_table.h',
146 'edk/system/local_data_pipe.cc',
147 'edk/system/local_data_pipe.h',
148 'edk/system/local_message_pipe_endpoint.cc',
149 'edk/system/local_message_pipe_endpoint.h',
150 'edk/system/mapping_table.cc',
151 'edk/system/mapping_table.h',
152 'edk/system/memory.cc',
153 'edk/system/memory.h',
154 'edk/system/message_in_transit.cc',
155 'edk/system/message_in_transit.h',
156 'edk/system/message_in_transit_queue.cc',
157 'edk/system/message_in_transit_queue.h',
158 'edk/system/message_pipe.cc',
159 'edk/system/message_pipe.h',
160 'edk/system/message_pipe_dispatcher.cc',
161 'edk/system/message_pipe_dispatcher.h',
162 'edk/system/message_pipe_endpoint.cc',
163 'edk/system/message_pipe_endpoint.h',
164 'edk/system/options_validation.h',
165 'edk/system/platform_handle_dispatcher.cc',
166 'edk/system/platform_handle_dispatcher.h',
167 'edk/system/proxy_message_pipe_endpoint.cc',
168 'edk/system/proxy_message_pipe_endpoint.h',
169 'edk/system/raw_channel.cc',
170 'edk/system/raw_channel.h',
171 'edk/system/raw_channel_posix.cc',
172 'edk/system/raw_channel_win.cc',
173 'edk/system/shared_buffer_dispatcher.cc',
174 'edk/system/shared_buffer_dispatcher.h',
175 'edk/system/simple_dispatcher.cc',
176 'edk/system/simple_dispatcher.h',
177 'edk/system/transport_data.cc',
178 'edk/system/transport_data.h',
179 'edk/system/waiter.cc',
180 'edk/system/waiter.h',
181 'edk/system/waiter_list.cc',
182 'edk/system/waiter_list.h',
184 # TODO(vtl): It's a little unfortunate that these end up in the same
185 # component as non-test-only code. In the static build, this code should
186 # hopefully be dead-stripped.
187 'edk/embedder/test_embedder.cc',
188 'edk/embedder/test_embedder.h',
190 'all_dependent_settings': {
191 # Ensures that dependent projects import the core functions on Windows.
192 'defines': ['MOJO_USE_SYSTEM_IMPL'],
196 # GN version: //mojo/edk/system:mojo_system_unittests
197 'target_name': 'mojo_system_unittests',
198 'type': 'executable',
200 '../base/base.gyp:base',
201 '../testing/gtest.gyp:gtest',
202 'mojo_common_test_support',
206 'edk/embedder/embedder_unittest.cc',
207 'edk/embedder/platform_channel_pair_posix_unittest.cc',
208 'edk/embedder/simple_platform_shared_buffer_unittest.cc',
209 'edk/system/channel_unittest.cc',
210 'edk/system/core_unittest.cc',
211 'edk/system/core_test_base.cc',
212 'edk/system/core_test_base.h',
213 'edk/system/data_pipe_unittest.cc',
214 'edk/system/dispatcher_unittest.cc',
215 'edk/system/local_data_pipe_unittest.cc',
216 'edk/system/memory_unittest.cc',
217 'edk/system/message_pipe_dispatcher_unittest.cc',
218 'edk/system/message_pipe_test_utils.h',
219 'edk/system/message_pipe_test_utils.cc',
220 'edk/system/message_pipe_unittest.cc',
221 'edk/system/multiprocess_message_pipe_unittest.cc',
222 'edk/system/options_validation_unittest.cc',
223 'edk/system/platform_handle_dispatcher_unittest.cc',
224 'edk/system/raw_channel_unittest.cc',
225 'edk/system/remote_message_pipe_unittest.cc',
226 'edk/system/run_all_unittests.cc',
227 'edk/system/shared_buffer_dispatcher_unittest.cc',
228 'edk/system/simple_dispatcher_unittest.cc',
229 'edk/system/test_utils.cc',
230 'edk/system/test_utils.h',
231 'edk/system/waiter_list_unittest.cc',
232 'edk/system/waiter_test_utils.cc',
233 'edk/system/waiter_test_utils.h',
234 'edk/system/waiter_unittest.cc',
239 'edk/embedder/embedder_unittest.cc',
240 'edk/system/multiprocess_message_pipe_unittest.cc',
246 # GN version: //mojo/edk/system:mojo_message_pipe_perftests
247 'target_name': 'mojo_message_pipe_perftests',
248 'type': 'executable',
250 '../base/base.gyp:base',
251 '../base/base.gyp:test_support_base',
252 '../base/base.gyp:test_support_perf',
253 '../testing/gtest.gyp:gtest',
254 'mojo_common_test_support',
255 'mojo_environment_chromium',
259 'edk/system/message_pipe_perftest.cc',
260 'edk/system/message_pipe_test_utils.h',
261 'edk/system/message_pipe_test_utils.cc',
262 'edk/system/test_utils.cc',
263 'edk/system/test_utils.h',
267 # GN version: //mojo/common/test:test_support_impl
268 'target_name': 'mojo_test_support_impl',
269 'type': 'static_library',
271 '../base/base.gyp:base',
274 'common/test/test_support_impl.cc',
275 'common/test/test_support_impl.h',
279 # GN version: //mojo/common
280 'target_name': 'mojo_common_lib',
281 'type': '<(component)',
283 'MOJO_COMMON_IMPLEMENTATION',
286 '../base/base.gyp:base',
287 '../url/url.gyp:url_lib',
288 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
289 '<(mojo_system_for_component)',
291 'export_dependent_settings': [
292 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
295 'common/common_type_converters.cc',
296 'common/common_type_converters.h',
297 'common/data_pipe_utils.cc',
298 'common/data_pipe_utils.h',
299 'common/handle_watcher.cc',
300 'common/handle_watcher.h',
301 'common/message_pump_mojo.cc',
302 'common/message_pump_mojo.h',
303 'common/message_pump_mojo_handler.h',
304 'common/time_helper.cc',
305 'common/time_helper.h',
309 # GN version: //mojo/edk/test:test_support
310 'target_name': 'mojo_common_test_support',
311 'type': 'static_library',
313 '../base/base.gyp:base',
314 '../base/base.gyp:test_support_base',
315 '../testing/gtest.gyp:gtest',
319 'edk/test/multiprocess_test_helper.cc',
320 'edk/test/multiprocess_test_helper.h',
321 'edk/test/test_utils.h',
322 'edk/test/test_utils_posix.cc',
323 'edk/test/test_utils_win.cc',
328 'edk/test/multiprocess_test_helper.cc',
334 # GN version: //mojo/common:mojo_common_unittests
335 'target_name': 'mojo_common_unittests',
336 'type': 'executable',
338 '../base/base.gyp:base',
339 '../base/base.gyp:base_message_loop_tests',
340 '../testing/gtest.gyp:gtest',
341 '../url/url.gyp:url_lib',
343 'mojo_environment_chromium',
345 'mojo_common_test_support',
346 'mojo_public_test_utils',
347 'mojo_run_all_unittests',
350 'common/common_type_converters_unittest.cc',
351 'common/handle_watcher_unittest.cc',
352 'common/message_pump_mojo_unittest.cc',
353 'edk/test/multiprocess_test_helper_unittest.cc',
358 'edk/test/multiprocess_test_helper_unittest.cc',
364 # GN version: //mojo/environment:chromium
365 'target_name': 'mojo_environment_chromium',
366 'type': 'static_library',
368 'mojo_environment_chromium_impl',
371 'environment/environment.cc',
372 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
373 "public/cpp/environment/logging.h",
374 "public/cpp/environment/lib/logging.cc",
379 'export_dependent_settings': [
380 'mojo_environment_chromium_impl',
384 # GN version: //mojo/environment:chromium_impl
385 'target_name': 'mojo_environment_chromium_impl',
386 'type': '<(component)',
388 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
391 '../base/base.gyp:base',
392 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
394 '<(mojo_system_for_component)',
397 'environment/default_async_waiter_impl.cc',
398 'environment/default_async_waiter_impl.h',
399 'environment/default_logger_impl.cc',
400 'environment/default_logger_impl.h',
407 # GN version: //mojo/services/gles2:interfaces (for files generated from
409 # GN version: //mojo/services/gles2:bindings
410 'target_name': 'mojo_gles2_bindings',
411 'type': 'static_library',
413 'services/gles2/command_buffer.mojom',
414 'services/gles2/command_buffer_type_conversions.cc',
415 'services/gles2/command_buffer_type_conversions.h',
416 'services/gles2/mojo_buffer_backing.cc',
417 'services/gles2/mojo_buffer_backing.h',
419 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
420 'export_dependent_settings': [
425 '../gpu/gpu.gyp:command_buffer_common',
429 # GN version: //mojo/gles2
430 'target_name': 'mojo_gles2_impl',
431 'type': '<(component)',
433 '../base/base.gyp:base',
434 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
435 '../gpu/gpu.gyp:command_buffer_client',
436 '../gpu/gpu.gyp:command_buffer_common',
437 '../gpu/gpu.gyp:gles2_cmd_helper',
438 '../gpu/gpu.gyp:gles2_implementation',
439 'mojo_environment_chromium',
440 'mojo_gles2_bindings',
441 '<(mojo_system_for_component)',
445 'GL_GLEXT_PROTOTYPES',
446 'MOJO_GLES2_IMPLEMENTATION',
447 'MOJO_GLES2_IMPL_IMPLEMENTATION',
448 'MOJO_USE_GLES2_IMPL'
450 'direct_dependent_settings': {
455 'export_dependent_settings': [
456 'mojo_gles2_bindings',
459 'gles2/command_buffer_client_impl.cc',
460 'gles2/command_buffer_client_impl.h',
461 'gles2/gles2_impl_export.h',
462 'gles2/gles2_impl.cc',
463 'gles2/gles2_context.cc',
464 'gles2/gles2_context.h',
466 'all_dependent_settings': {
467 # Ensures that dependent projects import the core functions on Windows.
468 'defines': ['MOJO_USE_GLES2_IMPL'],
472 # GN version: //mojo/application
473 'target_name': 'mojo_application_chromium',
474 'type': 'static_library',
476 'application/application_runner_chromium.cc',
477 'application/application_runner_chromium.h',
480 'mojo_application_base',
482 'mojo_environment_chromium',
484 'export_dependent_settings': [
485 'mojo_application_base',
489 # GN version: //mojo/bindings/js
490 'target_name': 'mojo_js_bindings_lib',
491 'type': 'static_library',
493 '../base/base.gyp:base',
494 '../gin/gin.gyp:gin',
495 '../v8/tools/gyp/v8.gyp:v8',
498 'export_dependent_settings': [
499 '../base/base.gyp:base',
500 '../gin/gin.gyp:gin',
504 # Sources list duplicated in GN build.
505 'bindings/js/core.cc',
506 'bindings/js/core.h',
507 'bindings/js/drain_data.cc',
508 'bindings/js/drain_data.h',
509 'bindings/js/handle.cc',
510 'bindings/js/handle.h',
511 'bindings/js/handle_close_observer.h',
512 'bindings/js/support.cc',
513 'bindings/js/support.h',
514 'bindings/js/waiting_callback.cc',
515 'bindings/js/waiting_callback.h',
519 # GN version: //mojo/tools:message_generator
520 'target_name': 'mojo_message_generator',
521 'type': 'executable',
523 '../base/base.gyp:base',
524 '../testing/gtest.gyp:gtest',
527 'mojo_environment_chromium',
531 'tools/message_generator.cc',
539 'target_name': 'mojo_jni_headers',
542 'mojo_java_set_jni_headers',
545 'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
546 'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
547 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
548 'services/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java',
549 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java',
552 'jni_gen_package': 'mojo',
554 'includes': [ '../build/jni_generator.gypi' ],
557 'target_name': 'mojo_java_set_jni_headers',
560 'jni_gen_package': 'mojo',
561 'input_java_class': 'java/util/HashSet.class',
563 'includes': [ '../build/jar_file_jni_generator.gypi' ],
566 'target_name': 'mojo_system_java',
569 '../base/base.gyp:base_java',
573 'java_in_dir': '<(DEPTH)/mojo/android/system',
575 'includes': [ '../build/java.gypi' ],
578 'target_name': 'libmojo_system_java',
579 'type': 'static_library',
581 '../base/base.gyp:base',
582 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
584 'mojo_environment_chromium',
589 'android/system/core_impl.cc',
590 'android/system/core_impl.h',
594 'target_name': 'libmojo_java_unittest',
595 'type': 'shared_library',
597 '../base/base.gyp:base',
598 '../base/base.gyp:test_support_base',
599 'libmojo_system_java',
601 'mojo_public_bindings_test_utils',
604 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest.
607 'android/javatests/mojo_test_case.cc',
608 'android/javatests/mojo_test_case.h',
609 'android/javatests/init_library.cc',
610 'android/javatests/validation_test_util.cc',
611 'android/javatests/validation_test_util.h',
615 'target_name': 'mojo_test_apk',
618 'mojo_bindings_java',
619 'mojo_public_test_interfaces',
621 '../base/base.gyp:base_java_test_support',
624 'apk_name': 'MojoTest',
625 'java_in_dir': '<(DEPTH)/mojo/android/javatests',
626 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk',
627 'native_lib_target': 'libmojo_java_unittest',
629 # Given that this apk tests itself, it needs to bring emma with it
632 ['emma_coverage != 0', {
633 'emma_instrument': 1,
637 'includes': [ '../build/java_apk.gypi' ],