morrita@chromium.org | fc53825 | 2014-07-31 07:54:06 +0900 | [diff] [blame] | 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 | { |
tim@chromium.org | 82f179c | 2014-08-07 08:30:48 +0900 | [diff] [blame^] | 345 | 'target_name': 'mojo_application_chromium', |
| 346 | 'type': 'static_library', |
| 347 | 'sources': [ |
| 348 | 'public/cpp/application/lib/application_impl_chromium.cc', |
| 349 | ], |
| 350 | 'dependencies': [ |
| 351 | 'mojo_application_base', |
| 352 | ], |
| 353 | 'export_dependent_settings': [ |
| 354 | 'mojo_application_base', |
| 355 | ], |
| 356 | }, |
| 357 | { |
morrita@chromium.org | fc53825 | 2014-07-31 07:54:06 +0900 | [diff] [blame] | 358 | # GN version: //mojo/bindings/js |
| 359 | 'target_name': 'mojo_js_bindings_lib', |
| 360 | 'type': 'static_library', |
| 361 | 'dependencies': [ |
| 362 | '../base/base.gyp:base', |
| 363 | '../gin/gin.gyp:gin', |
| 364 | '../v8/tools/gyp/v8.gyp:v8', |
| 365 | 'mojo_common_lib', |
| 366 | ], |
| 367 | 'export_dependent_settings': [ |
| 368 | '../base/base.gyp:base', |
| 369 | '../gin/gin.gyp:gin', |
| 370 | 'mojo_common_lib', |
| 371 | ], |
| 372 | 'sources': [ |
| 373 | # Sources list duplicated in GN build. |
| 374 | 'bindings/js/core.cc', |
| 375 | 'bindings/js/core.h', |
| 376 | 'bindings/js/handle.cc', |
| 377 | 'bindings/js/handle.h', |
| 378 | 'bindings/js/support.cc', |
| 379 | 'bindings/js/support.h', |
| 380 | 'bindings/js/waiting_callback.cc', |
| 381 | 'bindings/js/waiting_callback.h', |
| 382 | ], |
| 383 | }, |
| 384 | { |
| 385 | 'target_name': 'mojo_message_generator', |
| 386 | 'type': 'executable', |
| 387 | 'dependencies': [ |
| 388 | '../base/base.gyp:base', |
| 389 | '../testing/gtest.gyp:gtest', |
| 390 | 'mojo_common_lib', |
| 391 | 'mojo_cpp_bindings', |
| 392 | 'mojo_environment_chromium', |
| 393 | 'mojo_system_impl', |
| 394 | ], |
| 395 | 'sources': [ |
| 396 | 'tools/message_generator.cc', |
| 397 | ], |
| 398 | }, |
| 399 | ], |
| 400 | 'conditions': [ |
| 401 | ['OS=="android"', { |
| 402 | 'targets': [ |
| 403 | { |
| 404 | 'target_name': 'mojo_jni_headers', |
| 405 | 'type': 'none', |
| 406 | 'dependencies': [ |
| 407 | 'mojo_java_set_jni_headers', |
| 408 | ], |
| 409 | 'sources': [ |
| 410 | 'android/javatests/src/org/chromium/mojo/MojoTestCase.java', |
| 411 | 'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java', |
| 412 | 'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java', |
| 413 | 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java', |
| 414 | ], |
| 415 | 'variables': { |
| 416 | 'jni_gen_package': 'mojo', |
| 417 | }, |
| 418 | 'includes': [ '../build/jni_generator.gypi' ], |
| 419 | }, |
| 420 | { |
| 421 | 'target_name': 'mojo_java_set_jni_headers', |
| 422 | 'type': 'none', |
| 423 | 'variables': { |
| 424 | 'jni_gen_package': 'mojo', |
| 425 | 'input_java_class': 'java/util/HashSet.class', |
| 426 | }, |
| 427 | 'includes': [ '../build/jar_file_jni_generator.gypi' ], |
| 428 | }, |
| 429 | { |
| 430 | 'target_name': 'mojo_system_java', |
| 431 | 'type': 'none', |
| 432 | 'dependencies': [ |
| 433 | '../base/base.gyp:base_java', |
| 434 | 'mojo_public_java', |
| 435 | ], |
| 436 | 'variables': { |
| 437 | 'java_in_dir': '<(DEPTH)/mojo/android/system', |
| 438 | }, |
| 439 | 'includes': [ '../build/java.gypi' ], |
| 440 | }, |
| 441 | { |
| 442 | 'target_name': 'libmojo_system_java', |
| 443 | 'type': 'static_library', |
| 444 | 'dependencies': [ |
| 445 | '../base/base.gyp:base', |
| 446 | '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| 447 | 'mojo_common_lib', |
| 448 | 'mojo_environment_chromium', |
| 449 | 'mojo_jni_headers', |
| 450 | 'mojo_system_impl', |
| 451 | ], |
| 452 | 'sources': [ |
| 453 | 'android/system/core_impl.cc', |
| 454 | 'android/system/core_impl.h', |
| 455 | ], |
| 456 | }, |
| 457 | { |
| 458 | 'target_name': 'libmojo_java_unittest', |
| 459 | 'type': 'shared_library', |
| 460 | 'dependencies': [ |
| 461 | '../base/base.gyp:base', |
| 462 | '../base/base.gyp:test_support_base', |
| 463 | 'libmojo_system_java', |
| 464 | 'mojo_jni_headers', |
| 465 | ], |
| 466 | 'defines': [ |
| 467 | 'UNIT_TEST' # As exported from testing/gtest.gyp:gtest. |
| 468 | ], |
| 469 | 'sources': [ |
| 470 | 'android/javatests/mojo_test_case.cc', |
| 471 | 'android/javatests/mojo_test_case.h', |
| 472 | 'android/javatests/init_library.cc', |
| 473 | ], |
| 474 | }, |
| 475 | { |
| 476 | 'target_name': 'mojo_test_apk', |
| 477 | 'type': 'none', |
| 478 | 'dependencies': [ |
| 479 | 'mojo_bindings_java', |
| 480 | 'mojo_public_test_interfaces', |
| 481 | 'mojo_system_java', |
| 482 | '../base/base.gyp:base_java_test_support', |
| 483 | ], |
| 484 | 'variables': { |
| 485 | 'apk_name': 'MojoTest', |
| 486 | 'java_in_dir': '<(DEPTH)/mojo/android/javatests', |
| 487 | 'resource_dir': '<(DEPTH)/mojo/android/javatests/apk', |
| 488 | 'native_lib_target': 'libmojo_java_unittest', |
| 489 | 'is_test_apk': 1, |
| 490 | # Given that this apk tests itself, it needs to bring emma with it |
| 491 | # when instrumented. |
| 492 | 'conditions': [ |
| 493 | ['emma_coverage != 0', { |
| 494 | 'emma_instrument': 1, |
| 495 | }], |
| 496 | ], |
| 497 | }, |
| 498 | 'includes': [ '../build/java_apk.gypi' ], |
| 499 | }, |
| 500 | ] |
| 501 | }], |
| 502 | ['test_isolation_mode != "noop"', { |
| 503 | 'targets': [ |
| 504 | { |
| 505 | 'target_name': 'mojo_js_unittests_run', |
| 506 | 'type': 'none', |
| 507 | 'dependencies': [ |
| 508 | 'mojo_js_unittests', |
| 509 | ], |
| 510 | 'includes': [ |
| 511 | '../build/isolate.gypi', |
| 512 | 'mojo_js_unittests.isolate', |
| 513 | ], |
| 514 | 'sources': [ |
| 515 | 'mojo_js_unittests.isolate', |
| 516 | ], |
| 517 | }, |
| 518 | ], |
| 519 | }], |
| 520 | ] |
| 521 | } |