1 # Copyright 2013 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 { 6 'variables': { 7 'chromium_code': 1, 8 }, 9 'includes': [ 10 'mojo_apps.gypi', 11 'mojo_examples.gypi', 12 'mojo_public.gypi', 13 'mojo_services.gypi', 14 ], 15 'targets': [ 16 { 17 'target_name': 'mojo', 18 'type': 'none', 19 'dependencies': [ 20 'mojo_bindings', 21 'mojo_bindings_unittests', 22 'mojo_common_lib', 23 'mojo_common_unittests', 24 'mojo_hello_world_service', 25 'mojo_js', 26 'mojo_js_unittests', 27 'mojo_public_perftests', 28 'mojo_public_test_support', 29 'mojo_public_unittests', 30 'mojo_sample_app', 31 'mojo_shell', 32 'mojo_shell_lib', 33 'mojo_system', 34 'mojo_system_impl', 35 'mojo_system_unittests', 36 'mojo_utility', 37 'mojo_utility_unittests', 38 ], 39 }, 40 { 41 'target_name': 'mojo_run_all_unittests', 42 'type': 'static_library', 43 'dependencies': [ 44 '../base/base.gyp:base', 45 '../base/base.gyp:test_support_base', 46 '../testing/gtest.gyp:gtest', 47 'mojo_system', 48 'mojo_system_impl', 49 ], 50 'sources': [ 51 'common/test/run_all_unittests.cc', 52 ], 53 }, 54 { 55 'target_name': 'mojo_run_all_perftests', 56 'type': 'static_library', 57 'dependencies': [ 58 '../base/base.gyp:test_support_base', 59 'mojo_system', 60 'mojo_system_impl', 61 ], 62 'sources': [ 63 'common/test/run_all_perftests.cc', 64 ], 65 }, 66 { 67 'target_name': 'mojo_system_impl', 68 'type': '<(component)', 69 'dependencies': [ 70 'mojo_system', 71 '../base/base.gyp:base', 72 ], 73 'defines': [ 74 'MOJO_SYSTEM_IMPL_IMPLEMENTATION', 75 ], 76 'sources': [ 77 'system/channel.cc', 78 'system/channel.h', 79 'system/constants.h', 80 'system/core_impl.cc', 81 'system/core_impl.h', 82 'system/data_pipe.cc', 83 'system/data_pipe.h', 84 'system/data_pipe_consumer_dispatcher.cc', 85 'system/data_pipe_consumer_dispatcher.h', 86 'system/data_pipe_producer_dispatcher.cc', 87 'system/data_pipe_producer_dispatcher.h', 88 'system/dispatcher.cc', 89 'system/dispatcher.h', 90 'system/local_data_pipe.cc', 91 'system/local_data_pipe.h', 92 'system/local_message_pipe_endpoint.cc', 93 'system/local_message_pipe_endpoint.h', 94 'system/memory.cc', 95 'system/memory.h', 96 'system/message_in_transit.cc', 97 'system/message_in_transit.h', 98 'system/message_pipe.cc', 99 'system/message_pipe.h', 100 'system/message_pipe_dispatcher.cc', 101 'system/message_pipe_dispatcher.h', 102 'system/message_pipe_endpoint.cc', 103 'system/message_pipe_endpoint.h', 104 'system/platform_channel.cc', 105 'system/platform_channel.h', 106 'system/platform_channel_handle.cc', 107 'system/platform_channel_handle.h', 108 'system/platform_channel_posix.cc', 109 'system/proxy_message_pipe_endpoint.cc', 110 'system/proxy_message_pipe_endpoint.h', 111 'system/raw_channel.h', 112 'system/raw_channel_posix.cc', 113 'system/raw_channel_win.cc', 114 'system/simple_dispatcher.cc', 115 'system/simple_dispatcher.h', 116 'system/waiter.cc', 117 'system/waiter.h', 118 'system/waiter_list.cc', 119 'system/waiter_list.h', 120 ], 121 }, 122 { 123 'target_name': 'mojo_system_unittests', 124 'type': 'executable', 125 'dependencies': [ 126 '../base/base.gyp:run_all_unittests', 127 '../testing/gtest.gyp:gtest', 128 'mojo_common_test_support', 129 'mojo_system', 130 'mojo_system_impl', 131 ], 132 'sources': [ 133 'system/core_impl_unittest.cc', 134 'system/core_test_base.cc', 135 'system/core_test_base.h', 136 'system/dispatcher_unittest.cc', 137 'system/message_pipe_dispatcher_unittest.cc', 138 'system/message_pipe_unittest.cc', 139 'system/multiprocess_message_pipe_unittest.cc', 140 'system/raw_channel_posix_unittest.cc', 141 'system/remote_message_pipe_posix_unittest.cc', 142 'system/simple_dispatcher_unittest.cc', 143 'system/test_utils.cc', 144 'system/test_utils.h', 145 'system/waiter_list_unittest.cc', 146 'system/waiter_test_utils.cc', 147 'system/waiter_test_utils.h', 148 'system/waiter_unittest.cc', 149 ], 150 }, 151 { 152 'target_name': 'mojo_gles2_impl', 153 'type': '<(component)', 154 'dependencies': [ 155 '../gpu/gpu.gyp:gles2_c_lib', 156 'mojo_gles2', 157 ], 158 'defines': [ 159 'MOJO_GLES2_IMPL_IMPLEMENTATION', 160 ], 161 'sources': [ 162 'gles2/export.h', 163 'gles2/gles2_impl.cc', 164 'gles2/gles2_impl.h', 165 ], 166 }, 167 { 168 'target_name': 'mojo_common_lib', 169 'type': '<(component)', 170 'defines': [ 171 'MOJO_COMMON_IMPLEMENTATION', 172 ], 173 'dependencies': [ 174 '../base/base.gyp:base', 175 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 176 'mojo_system', 177 ], 178 'sources': [ 179 'common/bindings_support_impl.cc', 180 'common/bindings_support_impl.h', 181 'common/common_type_converters.cc', 182 'common/common_type_converters.h', 183 'common/handle_watcher.cc', 184 'common/handle_watcher.h', 185 'common/message_pump_mojo.cc', 186 'common/message_pump_mojo.h', 187 'common/message_pump_mojo_handler.h', 188 ], 189 'conditions': [ 190 ['OS == "win"', { 191 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 192 'msvs_disabled_warnings': [ 193 4267, 194 ], 195 }], 196 ], 197 }, 198 { 199 'target_name': 'mojo_common_test_support', 200 'type': 'static_library', 201 'dependencies': [ 202 '../base/base.gyp:base', 203 '../base/base.gyp:test_support_base', 204 '../testing/gtest.gyp:gtest', 205 'mojo_system', 206 'mojo_system_impl', 207 ], 208 'sources': [ 209 'common/test/multiprocess_test_base.cc', 210 'common/test/multiprocess_test_base.h', 211 ], 212 }, 213 { 214 'target_name': 'mojo_common_unittests', 215 'type': 'executable', 216 'dependencies': [ 217 '../base/base.gyp:base', 218 '../base/base.gyp:base_message_loop_tests', 219 '../testing/gtest.gyp:gtest', 220 'mojo_bindings', 221 'mojo_common_lib', 222 'mojo_common_test_support', 223 'mojo_public_test_support', 224 'mojo_run_all_unittests', 225 'mojo_system', 226 'mojo_system_impl', 227 ], 228 'sources': [ 229 'common/common_type_converters_unittest.cc', 230 'common/handle_watcher_unittest.cc', 231 'common/message_pump_mojo_unittest.cc', 232 'common/test/multiprocess_test_base_unittest.cc', 233 ], 234 'conditions': [ 235 ['OS == "win"', { 236 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 237 'msvs_disabled_warnings': [ 238 4267, 239 ], 240 }], 241 ], 242 }, 243 { 244 'target_name': 'mojo_shell_lib', 245 'type': 'static_library', 246 'dependencies': [ 247 '../base/base.gyp:base', 248 '../net/net.gyp:net', 249 '../url/url.gyp:url_lib', 250 'mojo_bindings', 251 'mojo_gles2_impl', 252 'mojo_native_viewport_service', 253 'mojo_system', 254 'mojo_system_impl', 255 ], 256 'sources': [ 257 'shell/app_container.cc', 258 'shell/app_container.h', 259 'shell/context.cc', 260 'shell/context.h', 261 'shell/init.cc', 262 'shell/init.h', 263 'shell/loader.cc', 264 'shell/loader.h', 265 'shell/network_delegate.cc', 266 'shell/network_delegate.h', 267 'shell/run.cc', 268 'shell/run.h', 269 'shell/storage.cc', 270 'shell/storage.h', 271 'shell/switches.cc', 272 'shell/switches.h', 273 'shell/task_runners.cc', 274 'shell/task_runners.h', 275 'shell/url_request_context_getter.cc', 276 'shell/url_request_context_getter.h', 277 ], 278 'conditions': [ 279 ['OS == "win"', { 280 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 281 'msvs_disabled_warnings': [ 282 4267, 283 ], 284 }], 285 ], 286 }, 287 { 288 'target_name': 'mojo_shell', 289 'type': 'executable', 290 'dependencies': [ 291 '../base/base.gyp:base', 292 '../ui/gl/gl.gyp:gl', 293 '../url/url.gyp:url_lib', 294 'mojo_common_lib', 295 'mojo_shell_lib', 296 'mojo_system', 297 'mojo_system_impl', 298 ], 299 'sources': [ 300 'shell/desktop/mojo_main.cc', 301 ], 302 'conditions': [ 303 ['OS == "win"', { 304 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 305 'msvs_disabled_warnings': [ 306 4267, 307 ], 308 }], 309 ], 310 }, 311 ], 312 'conditions': [ 313 ['OS=="android"', { 314 'targets': [ 315 { 316 'target_name': 'mojo_native_viewport_java', 317 'type': 'none', 318 'dependencies': [ 319 '../base/base.gyp:base_java', 320 ], 321 'variables': { 322 'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android', 323 }, 324 'includes': [ '../build/java.gypi' ], 325 }, 326 { 327 'target_name': 'mojo_java_set_jni_headers', 328 'type': 'none', 329 'variables': { 330 'jni_gen_package': 'mojo', 331 'input_java_class': 'java/util/HashSet.class', 332 }, 333 'includes': [ '../build/jar_file_jni_generator.gypi' ], 334 }, 335 { 336 'target_name': 'mojo_jni_headers', 337 'type': 'none', 338 'dependencies': [ 339 'mojo_java_set_jni_headers', 340 ], 341 'direct_dependent_settings': { 342 'include_dirs': [ 343 '<(SHARED_INTERMEDIATE_DIR)/mojo', 344 ], 345 }, 346 'sources': [ 347 'services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java', 348 'shell/android/apk/src/org/chromium/mojo_shell_apk/MojoMain.java', 349 ], 350 'variables': { 351 'jni_gen_package': 'mojo' 352 }, 353 'includes': [ '../build/jni_generator.gypi' ], 354 }, 355 { 356 'target_name': 'libmojo_shell', 357 'type': 'shared_library', 358 'dependencies': [ 359 '../base/base.gyp:base', 360 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 361 '../ui/gfx/gfx.gyp:gfx', 362 '../ui/gl/gl.gyp:gl', 363 'mojo_common_lib', 364 'mojo_jni_headers', 365 'mojo_shell_lib', 366 ], 367 'sources': [ 368 'shell/android/library_loader.cc', 369 'shell/android/mojo_main.cc', 370 'shell/android/mojo_main.h', 371 ], 372 }, 373 { 374 'target_name': 'mojo_shell_apk', 375 'type': 'none', 376 'dependencies': [ 377 '../base/base.gyp:base_java', 378 '../net/net.gyp:net_java', 379 'mojo_native_viewport_java', 380 'libmojo_shell', 381 ], 382 'variables': { 383 'apk_name': 'MojoShell', 384 'java_in_dir': '<(DEPTH)/mojo/shell/android/apk', 385 'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res', 386 'native_lib_target': 'libmojo_shell', 387 }, 388 'includes': [ '../build/java_apk.gypi' ], 389 } 390 ], 391 }], 392 ], 393 } 394