OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 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. |
| 8 { |
| 9 'includes': [ |
| 10 'mojo_public.gypi', |
| 11 'mojo_public_tests.gypi', |
| 12 'mojo_variables.gypi', |
| 13 ], |
| 14 'targets': [ |
| 15 { |
| 16 'target_name': 'mojo_base', |
| 17 'type': 'none', |
| 18 'dependencies': [ |
| 19 'mojo_common_lib', |
| 20 'mojo_common_unittests', |
| 21 'mojo_cpp_bindings', |
| 22 'mojo_js_bindings', |
| 23 'mojo_js_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', |
| 32 'mojo_system', |
| 33 'mojo_system_impl', |
| 34 'mojo_system_unittests', |
| 35 'mojo_utility', |
| 36 ], |
| 37 'conditions': [ |
| 38 ['OS == "android"', { |
| 39 'dependencies': [ |
| 40 'mojo_bindings_java', |
| 41 'mojo_public_java', |
| 42 'mojo_system_java', |
| 43 'libmojo_system_java', |
| 44 'mojo_test_apk', |
| 45 ], |
| 46 }], |
| 47 ] |
| 48 }, |
| 49 { |
| 50 'target_name': 'mojo_none', |
| 51 'type': 'none', |
| 52 }, |
| 53 { |
| 54 'target_name': 'mojo_run_all_unittests', |
| 55 'type': 'static_library', |
| 56 'dependencies': [ |
| 57 '../base/base.gyp:base', |
| 58 '../base/base.gyp:test_support_base', |
| 59 '../testing/gtest.gyp:gtest', |
| 60 'mojo_system_impl', |
| 61 'mojo_test_support', |
| 62 'mojo_test_support_impl', |
| 63 ], |
| 64 'sources': [ |
| 65 'common/test/run_all_unittests.cc', |
| 66 ], |
| 67 }, |
| 68 { |
| 69 'target_name': 'mojo_run_all_perftests', |
| 70 'type': 'static_library', |
| 71 'dependencies': [ |
| 72 '../base/base.gyp:test_support_base', |
| 73 'mojo_system_impl', |
| 74 'mojo_test_support', |
| 75 'mojo_test_support_impl', |
| 76 ], |
| 77 'sources': [ |
| 78 'common/test/run_all_perftests.cc', |
| 79 ], |
| 80 }, |
| 81 { |
| 82 # GN version: //mojo/system |
| 83 'target_name': 'mojo_system_impl', |
| 84 'type': '<(component)', |
| 85 'dependencies': [ |
| 86 '../base/base.gyp:base', |
| 87 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 88 ], |
| 89 'defines': [ |
| 90 'MOJO_SYSTEM_IMPL_IMPLEMENTATION', |
| 91 'MOJO_SYSTEM_IMPLEMENTATION', |
| 92 'MOJO_USE_SYSTEM_IMPL', |
| 93 ], |
| 94 'sources': [ |
| 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/scoped_platform_handle.h', |
| 112 'system/channel.cc', |
| 113 'system/channel.h', |
| 114 'system/constants.h', |
| 115 'system/core.cc', |
| 116 'system/core.h', |
| 117 'system/data_pipe.cc', |
| 118 'system/data_pipe.h', |
| 119 'system/data_pipe_consumer_dispatcher.cc', |
| 120 'system/data_pipe_consumer_dispatcher.h', |
| 121 'system/data_pipe_producer_dispatcher.cc', |
| 122 'system/data_pipe_producer_dispatcher.h', |
| 123 'system/dispatcher.cc', |
| 124 'system/dispatcher.h', |
| 125 'system/entrypoints.cc', |
| 126 'system/handle_signals_state.h', |
| 127 'system/handle_table.cc', |
| 128 'system/handle_table.h', |
| 129 'system/local_data_pipe.cc', |
| 130 'system/local_data_pipe.h', |
| 131 'system/local_message_pipe_endpoint.cc', |
| 132 'system/local_message_pipe_endpoint.h', |
| 133 'system/mapping_table.cc', |
| 134 'system/mapping_table.h', |
| 135 'system/memory.cc', |
| 136 'system/memory.h', |
| 137 'system/message_in_transit.cc', |
| 138 'system/message_in_transit.h', |
| 139 'system/message_in_transit_queue.cc', |
| 140 'system/message_in_transit_queue.h', |
| 141 'system/message_pipe.cc', |
| 142 'system/message_pipe.h', |
| 143 'system/message_pipe_dispatcher.cc', |
| 144 'system/message_pipe_dispatcher.h', |
| 145 'system/message_pipe_endpoint.cc', |
| 146 'system/message_pipe_endpoint.h', |
| 147 'system/options_validation.h', |
| 148 'system/platform_handle_dispatcher.cc', |
| 149 'system/platform_handle_dispatcher.h', |
| 150 'system/proxy_message_pipe_endpoint.cc', |
| 151 'system/proxy_message_pipe_endpoint.h', |
| 152 'system/raw_channel.cc', |
| 153 'system/raw_channel.h', |
| 154 'system/raw_channel_posix.cc', |
| 155 'system/raw_channel_win.cc', |
| 156 'system/raw_shared_buffer.cc', |
| 157 'system/raw_shared_buffer.h', |
| 158 'system/raw_shared_buffer_posix.cc', |
| 159 'system/raw_shared_buffer_win.cc', |
| 160 'system/shared_buffer_dispatcher.cc', |
| 161 'system/shared_buffer_dispatcher.h', |
| 162 'system/simple_dispatcher.cc', |
| 163 'system/simple_dispatcher.h', |
| 164 'system/transport_data.cc', |
| 165 'system/transport_data.h', |
| 166 'system/waiter.cc', |
| 167 'system/waiter.h', |
| 168 'system/waiter_list.cc', |
| 169 'system/waiter_list.h', |
| 170 # Test-only code: |
| 171 # TODO(vtl): It's a little unfortunate that these end up in the same |
| 172 # component as non-test-only code. In the static build, this code should |
| 173 # hopefully be dead-stripped. |
| 174 'embedder/test_embedder.cc', |
| 175 'embedder/test_embedder.h', |
| 176 ], |
| 177 'all_dependent_settings': { |
| 178 # Ensures that dependent projects import the core functions on Windows. |
| 179 'defines': ['MOJO_USE_SYSTEM_IMPL'], |
| 180 } |
| 181 }, |
| 182 { |
| 183 'target_name': 'mojo_system_unittests', |
| 184 'type': 'executable', |
| 185 'dependencies': [ |
| 186 '../base/base.gyp:base', |
| 187 '../testing/gtest.gyp:gtest', |
| 188 'mojo_common_test_support', |
| 189 'mojo_system_impl', |
| 190 ], |
| 191 'sources': [ |
| 192 'embedder/embedder_unittest.cc', |
| 193 'embedder/platform_channel_pair_posix_unittest.cc', |
| 194 'system/channel_unittest.cc', |
| 195 'system/core_unittest.cc', |
| 196 'system/core_test_base.cc', |
| 197 'system/core_test_base.h', |
| 198 'system/data_pipe_unittest.cc', |
| 199 'system/dispatcher_unittest.cc', |
| 200 'system/local_data_pipe_unittest.cc', |
| 201 'system/memory_unittest.cc', |
| 202 'system/message_pipe_dispatcher_unittest.cc', |
| 203 'system/message_pipe_unittest.cc', |
| 204 'system/multiprocess_message_pipe_unittest.cc', |
| 205 'system/options_validation_unittest.cc', |
| 206 'system/platform_handle_dispatcher_unittest.cc', |
| 207 'system/raw_channel_unittest.cc', |
| 208 'system/raw_shared_buffer_unittest.cc', |
| 209 'system/remote_message_pipe_unittest.cc', |
| 210 'system/run_all_unittests.cc', |
| 211 'system/shared_buffer_dispatcher_unittest.cc', |
| 212 'system/simple_dispatcher_unittest.cc', |
| 213 'system/test_utils.cc', |
| 214 'system/test_utils.h', |
| 215 'system/waiter_list_unittest.cc', |
| 216 'system/waiter_test_utils.cc', |
| 217 'system/waiter_test_utils.h', |
| 218 'system/waiter_unittest.cc', |
| 219 ], |
| 220 }, |
| 221 { |
| 222 'target_name': 'mojo_test_support_impl', |
| 223 'type': 'static_library', |
| 224 'dependencies': [ |
| 225 '../base/base.gyp:base', |
| 226 ], |
| 227 'sources': [ |
| 228 'common/test/test_support_impl.cc', |
| 229 'common/test/test_support_impl.h', |
| 230 ], |
| 231 }, |
| 232 { |
| 233 # GN version: //mojo/common |
| 234 'target_name': 'mojo_common_lib', |
| 235 'type': '<(component)', |
| 236 'defines': [ |
| 237 'MOJO_COMMON_IMPLEMENTATION', |
| 238 ], |
| 239 'dependencies': [ |
| 240 '../base/base.gyp:base', |
| 241 '../url/url.gyp:url_lib', |
| 242 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 243 '<(mojo_system_for_component)', |
| 244 ], |
| 245 'export_dependent_settings': [ |
| 246 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 247 ], |
| 248 'sources': [ |
| 249 'common/common_type_converters.cc', |
| 250 'common/common_type_converters.h', |
| 251 'common/data_pipe_utils.cc', |
| 252 'common/data_pipe_utils.h', |
| 253 'common/handle_watcher.cc', |
| 254 'common/handle_watcher.h', |
| 255 'common/message_pump_mojo.cc', |
| 256 'common/message_pump_mojo.h', |
| 257 'common/message_pump_mojo_handler.h', |
| 258 'common/time_helper.cc', |
| 259 'common/time_helper.h', |
| 260 ], |
| 261 }, |
| 262 { |
| 263 'target_name': 'mojo_common_test_support', |
| 264 'type': 'static_library', |
| 265 'dependencies': [ |
| 266 '../base/base.gyp:base', |
| 267 '../base/base.gyp:test_support_base', |
| 268 '../testing/gtest.gyp:gtest', |
| 269 'mojo_system_impl', |
| 270 ], |
| 271 'sources': [ |
| 272 'common/test/multiprocess_test_helper.cc', |
| 273 'common/test/multiprocess_test_helper.h', |
| 274 'common/test/test_utils.h', |
| 275 'common/test/test_utils_posix.cc', |
| 276 'common/test/test_utils_win.cc', |
| 277 ], |
| 278 }, |
| 279 { |
| 280 'target_name': 'mojo_common_unittests', |
| 281 'type': 'executable', |
| 282 'dependencies': [ |
| 283 '../base/base.gyp:base', |
| 284 '../base/base.gyp:base_message_loop_tests', |
| 285 '../testing/gtest.gyp:gtest', |
| 286 '../url/url.gyp:url_lib', |
| 287 'mojo_cpp_bindings', |
| 288 'mojo_environment_chromium', |
| 289 'mojo_common_lib', |
| 290 'mojo_common_test_support', |
| 291 'mojo_public_test_utils', |
| 292 'mojo_run_all_unittests', |
| 293 ], |
| 294 'sources': [ |
| 295 'common/common_type_converters_unittest.cc', |
| 296 'common/handle_watcher_unittest.cc', |
| 297 'common/message_pump_mojo_unittest.cc', |
| 298 'common/test/multiprocess_test_helper_unittest.cc', |
| 299 ], |
| 300 }, |
| 301 { |
| 302 # GN version: //mojo/environment:chromium |
| 303 'target_name': 'mojo_environment_chromium', |
| 304 'type': 'static_library', |
| 305 'dependencies': [ |
| 306 'mojo_environment_chromium_impl', |
| 307 ], |
| 308 'sources': [ |
| 309 'environment/environment.cc', |
| 310 # TODO(vtl): This is kind of ugly. (See TODO in logging.h.) |
| 311 "public/cpp/environment/logging.h", |
| 312 "public/cpp/environment/lib/logging.cc", |
| 313 ], |
| 314 'include_dirs': [ |
| 315 '..', |
| 316 ], |
| 317 'export_dependent_settings': [ |
| 318 'mojo_environment_chromium_impl', |
| 319 ], |
| 320 }, |
| 321 { |
| 322 # GN version: //mojo/environment:chromium_impl |
| 323 'target_name': 'mojo_environment_chromium_impl', |
| 324 'type': '<(component)', |
| 325 'defines': [ |
| 326 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION', |
| 327 ], |
| 328 'dependencies': [ |
| 329 '../base/base.gyp:base', |
| 330 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 331 'mojo_common_lib', |
| 332 '<(mojo_system_for_component)', |
| 333 ], |
| 334 'sources': [ |
| 335 'environment/default_async_waiter_impl.cc', |
| 336 'environment/default_async_waiter_impl.h', |
| 337 'environment/default_logger_impl.cc', |
| 338 'environment/default_logger_impl.h', |
| 339 ], |
| 340 'include_dirs': [ |
| 341 '..', |
| 342 ], |
| 343 }, |
| 344 { |
| 345 # GN version: //mojo/bindings/js |
| 346 'target_name': 'mojo_js_bindings_lib', |
| 347 'type': 'static_library', |
| 348 'dependencies': [ |
| 349 '../base/base.gyp:base', |
| 350 '../gin/gin.gyp:gin', |
| 351 '../v8/tools/gyp/v8.gyp:v8', |
| 352 'mojo_common_lib', |
| 353 ], |
| 354 'export_dependent_settings': [ |
| 355 '../base/base.gyp:base', |
| 356 '../gin/gin.gyp:gin', |
| 357 'mojo_common_lib', |
| 358 ], |
| 359 'sources': [ |
| 360 # Sources list duplicated in GN build. |
| 361 'bindings/js/core.cc', |
| 362 'bindings/js/core.h', |
| 363 'bindings/js/handle.cc', |
| 364 'bindings/js/handle.h', |
| 365 'bindings/js/support.cc', |
| 366 'bindings/js/support.h', |
| 367 'bindings/js/waiting_callback.cc', |
| 368 'bindings/js/waiting_callback.h', |
| 369 ], |
| 370 }, |
| 371 { |
| 372 'target_name': 'mojo_message_generator', |
| 373 'type': 'executable', |
| 374 'dependencies': [ |
| 375 '../base/base.gyp:base', |
| 376 '../testing/gtest.gyp:gtest', |
| 377 'mojo_common_lib', |
| 378 'mojo_cpp_bindings', |
| 379 'mojo_environment_chromium', |
| 380 'mojo_system_impl', |
| 381 ], |
| 382 'sources': [ |
| 383 'tools/message_generator.cc', |
| 384 ], |
| 385 }, |
| 386 ], |
| 387 'conditions': [ |
| 388 ['OS=="android"', { |
| 389 'targets': [ |
| 390 { |
| 391 'target_name': 'mojo_jni_headers', |
| 392 'type': 'none', |
| 393 'dependencies': [ |
| 394 'mojo_java_set_jni_headers', |
| 395 ], |
| 396 'sources': [ |
| 397 'android/javatests/src/org/chromium/mojo/MojoTestCase.java', |
| 398 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java', |
| 399 'services/native_viewport/android/src/org/chromium/mojo/NativeViewpo
rtAndroid.java', |
| 400 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java', |
| 401 ], |
| 402 'variables': { |
| 403 'jni_gen_package': 'mojo', |
| 404 }, |
| 405 'includes': [ '../build/jni_generator.gypi' ], |
| 406 }, |
| 407 { |
| 408 'target_name': 'mojo_java_set_jni_headers', |
| 409 'type': 'none', |
| 410 'variables': { |
| 411 'jni_gen_package': 'mojo', |
| 412 'input_java_class': 'java/util/HashSet.class', |
| 413 }, |
| 414 'includes': [ '../build/jar_file_jni_generator.gypi' ], |
| 415 }, |
| 416 { |
| 417 'target_name': 'mojo_system_java', |
| 418 'type': 'none', |
| 419 'dependencies': [ |
| 420 '../base/base.gyp:base_java', |
| 421 'mojo_public_java', |
| 422 ], |
| 423 'variables': { |
| 424 'java_in_dir': '<(DEPTH)/mojo/android/system', |
| 425 }, |
| 426 'includes': [ '../build/java.gypi' ], |
| 427 }, |
| 428 { |
| 429 'target_name': 'libmojo_system_java', |
| 430 'type': 'static_library', |
| 431 'dependencies': [ |
| 432 '../base/base.gyp:base', |
| 433 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn
amic_annotations', |
| 434 'mojo_common_lib', |
| 435 'mojo_environment_chromium', |
| 436 'mojo_jni_headers', |
| 437 'mojo_system_impl', |
| 438 ], |
| 439 'sources': [ |
| 440 'android/system/core_impl.cc', |
| 441 'android/system/core_impl.h', |
| 442 ], |
| 443 }, |
| 444 { |
| 445 'target_name': 'libmojo_java_unittest', |
| 446 'type': 'shared_library', |
| 447 'dependencies': [ |
| 448 '../base/base.gyp:base', |
| 449 '../base/base.gyp:test_support_base', |
| 450 'libmojo_system_java', |
| 451 'mojo_jni_headers', |
| 452 ], |
| 453 'defines': [ |
| 454 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest. |
| 455 ], |
| 456 'sources': [ |
| 457 'android/javatests/mojo_test_case.cc', |
| 458 'android/javatests/mojo_test_case.h', |
| 459 'android/javatests/init_library.cc', |
| 460 ], |
| 461 }, |
| 462 { |
| 463 'target_name': 'mojo_test_apk', |
| 464 'type': 'none', |
| 465 'dependencies': [ |
| 466 'mojo_bindings_java', |
| 467 'mojo_public_test_interfaces', |
| 468 'mojo_system_java', |
| 469 '../base/base.gyp:base_java_test_support', |
| 470 ], |
| 471 'variables': { |
| 472 'apk_name': 'MojoTest', |
| 473 'java_in_dir': '<(DEPTH)/mojo/android/javatests', |
| 474 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk', |
| 475 'native_lib_target': 'libmojo_java_unittest', |
| 476 'is_test_apk': 1, |
| 477 # Given that this apk tests itself, it needs to bring emma with it |
| 478 # when instrumented. |
| 479 'conditions': [ |
| 480 ['emma_coverage != 0', { |
| 481 'emma_instrument': 1, |
| 482 }], |
| 483 ], |
| 484 }, |
| 485 'includes': [ '../build/java_apk.gypi' ], |
| 486 }, |
| 487 ] |
| 488 }], |
| 489 ['test_isolation_mode != "noop"', { |
| 490 'targets': [ |
| 491 { |
| 492 'target_name': 'mojo_js_unittests_run', |
| 493 'type': 'none', |
| 494 'dependencies': [ |
| 495 'mojo_js_unittests', |
| 496 ], |
| 497 'includes': [ |
| 498 '../build/isolate.gypi', |
| 499 'mojo_js_unittests.isolate', |
| 500 ], |
| 501 'sources': [ |
| 502 'mojo_js_unittests.isolate', |
| 503 ], |
| 504 }, |
| 505 ], |
| 506 }], |
| 507 ] |
| 508 } |
OLD | NEW |