1 # Copyright (c) 2012 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, # Use higher warning level. 8 'chromium_enable_vtune_jit_for_v8%': 0, # enable the vtune support for V8 engine. 9 'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)', 10 }, 11 'target_defaults': { 12 'defines': ['CONTENT_IMPLEMENTATION'], 13 'conditions': [ 14 # TODO(jschuh): Remove this after crbug.com/173851 gets fixed. 15 ['OS=="win" and target_arch=="x64"', { 16 'msvs_settings': { 17 'VCCLCompilerTool': { 18 'AdditionalOptions': ['/bigobj'], 19 }, 20 }, 21 }], 22 ], 23 }, 24 'includes': [ 25 'content_tests.gypi', 26 ], 27 'conditions': [ 28 ['OS != "ios"', { 29 'includes': [ 30 '../build/win_precompile.gypi', 31 'content_shell.gypi', 32 ], 33 }], 34 # In component mode, we build all of content as a single DLL. 35 # However, in the static mode, we need to build content as multiple 36 # targets in order to prevent dependencies from getting introduced 37 # upstream unnecessarily (e.g., content_renderer depends on allocator 38 # and chrome_exe depends on content_common but we don't want 39 # chrome_exe to have to depend on allocator). 40 ['component=="static_library"', { 41 'target_defines': [ 42 'COMPILE_CONTENT_STATICALLY', 43 ], 44 'targets': [ 45 { 46 'target_name': 'content', 47 'type': 'none', 48 'dependencies': [ 49 'content_app_browser', 50 'content_browser', 51 'content_child', 52 'content_common', 53 ], 54 'conditions': [ 55 ['OS != "ios"', { 56 'dependencies': [ 57 'content_gpu', 58 'content_plugin', 59 'content_ppapi_plugin', 60 'content_renderer', 61 'content_utility', 62 'content_worker', 63 ], 64 }], 65 ], 66 }, 67 { 68 'target_name': 'content_app_browser', 69 'type': 'static_library', 70 'variables': { 'enable_wexit_time_destructors': 1, }, 71 'includes': [ 72 'content_app.gypi', 73 ], 74 'dependencies': [ 75 'content_common', 76 ], 77 'conditions': [ 78 ['chrome_multiple_dll', { 79 'defines': [ 80 'CHROME_MULTIPLE_DLL_BROWSER', 81 ], 82 }], 83 ], 84 }, 85 { 86 'target_name': 'content_app_child', 87 'type': 'static_library', 88 'variables': { 'enable_wexit_time_destructors': 1, }, 89 'includes': [ 90 'content_app.gypi', 91 ], 92 'dependencies': [ 93 'content_common', 94 ], 95 'conditions': [ 96 ['chrome_multiple_dll', { 97 'defines': [ 98 'CHROME_MULTIPLE_DLL_CHILD', 99 ], 100 }], 101 ], 102 }, 103 { 104 'target_name': 'content_app_both', 105 'type': 'static_library', 106 'variables': { 'enable_wexit_time_destructors': 1, }, 107 'includes': [ 108 'content_app.gypi', 109 ], 110 'dependencies': [ 111 'content_common', 112 ], 113 }, 114 { 115 'target_name': 'content_browser', 116 'type': 'static_library', 117 'variables': { 'enable_wexit_time_destructors': 1, }, 118 'includes': [ 119 'content_browser.gypi', 120 ], 121 'dependencies': [ 122 'content_common', 123 'content_resources.gyp:content_resources', 124 ], 125 'conditions': [ 126 ['OS != "ios" and chrome_multiple_dll != 1', { 127 'dependencies': [ 128 'content_gpu', 129 'content_utility', 130 ], 131 }], 132 ['java_bridge==1', { 133 'dependencies': [ 134 'content_child', 135 ] 136 }] 137 ], 138 }, 139 { 140 'target_name': 'content_common', 141 'type': 'static_library', 142 'variables': { 'enable_wexit_time_destructors': 1, }, 143 'includes': [ 144 'content_common.gypi', 145 ], 146 'conditions': [ 147 ['OS != "ios"', { 148 'dependencies': [ 149 'content_resources.gyp:content_resources', 150 ], 151 }], 152 ], 153 # Disable c4267 warnings until we fix size_t to int truncations. 154 'msvs_disabled_warnings': [ 4267, ], 155 }, 156 { 157 'target_name': 'content_child', 158 'type': 'static_library', 159 'variables': { 'enable_wexit_time_destructors': 1, }, 160 'includes': [ 161 'content_child.gypi', 162 ], 163 'conditions': [ 164 ['OS != "ios"', { 165 'dependencies': [ 166 'content_resources.gyp:content_resources', 167 ], 168 }], 169 ], 170 # Disable c4267 warnings until we fix size_t to int truncations. 171 'msvs_disabled_warnings': [ 4267, ], 172 }, 173 174 ], 175 'conditions': [ 176 ['OS != "ios"', { 177 'targets': [ 178 { 179 'target_name': 'content_gpu', 180 'type': 'static_library', 181 'variables': { 'enable_wexit_time_destructors': 1, }, 182 'includes': [ 183 'content_gpu.gypi', 184 ], 185 'dependencies': [ 186 'content_child', 187 'content_common', 188 ], 189 }, 190 { 191 'target_name': 'content_plugin', 192 'type': 'static_library', 193 'variables': { 'enable_wexit_time_destructors': 1, }, 194 'includes': [ 195 'content_plugin.gypi', 196 ], 197 'dependencies': [ 198 'content_child', 199 'content_common', 200 ], 201 }, 202 { 203 'target_name': 'content_ppapi_plugin', 204 'type': 'static_library', 205 'variables': { 'enable_wexit_time_destructors': 1, }, 206 'includes': [ 207 'content_ppapi_plugin.gypi', 208 ], 209 # Disable c4267 warnings until we fix size_t to int truncations. 210 'msvs_disabled_warnings': [ 4267, ], 211 }, 212 { 213 'target_name': 'content_renderer', 214 'type': 'static_library', 215 'variables': { 'enable_wexit_time_destructors': 1, }, 216 'includes': [ 217 'content_renderer.gypi', 218 ], 219 'dependencies': [ 220 'content_child', 221 'content_common', 222 'content_resources.gyp:content_resources', 223 ], 224 'conditions': [ 225 ['chromium_enable_vtune_jit_for_v8==1', { 226 'dependencies': [ 227 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune', 228 ], 229 }], 230 ], 231 }, 232 { 233 'target_name': 'content_utility', 234 'type': 'static_library', 235 'variables': { 'enable_wexit_time_destructors': 1, }, 236 'includes': [ 237 'content_utility.gypi', 238 ], 239 'dependencies': [ 240 'content_child', 241 'content_common', 242 ], 243 }, 244 { 245 'target_name': 'content_worker', 246 'type': 'static_library', 247 'variables': { 'enable_wexit_time_destructors': 1, }, 248 'includes': [ 249 'content_worker.gypi', 250 ], 251 'dependencies': [ 252 'content_child', 253 'content_common', 254 ], 255 }, 256 ], 257 }], 258 ], 259 }, 260 { # component != static_library 261 'targets': [ 262 { 263 'target_name': 'content', 264 'type': 'shared_library', 265 'variables': { 'enable_wexit_time_destructors': 1, }, 266 'dependencies': [ 267 'content_resources.gyp:content_resources', 268 ], 269 'conditions': [ 270 ['OS=="mac"', { 271 'dependencies': [ 272 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override', 273 ], 274 }], 275 ['chromium_enable_vtune_jit_for_v8==1', { 276 'dependencies': [ 277 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune', 278 ], 279 }], 280 ], 281 'includes': [ 282 'content_app.gypi', 283 'content_browser.gypi', 284 'content_child.gypi', 285 'content_common.gypi', 286 'content_gpu.gypi', 287 'content_plugin.gypi', 288 'content_ppapi_plugin.gypi', 289 'content_renderer.gypi', 290 'content_utility.gypi', 291 'content_worker.gypi', 292 ], 293 'msvs_settings': { 294 'VCLinkerTool': { 295 'conditions': [ 296 ['incremental_chrome_dll==1', { 297 'UseLibraryDependencyInputs': "true", 298 }], 299 ], 300 }, 301 }, 302 }, 303 { 304 'target_name': 'content_app_browser', 305 'type': 'none', 306 'dependencies': ['content', 'content_browser'], 307 }, 308 { 309 'target_name': 'content_app_child', 310 'type': 'none', 311 'dependencies': ['content', 'content_child'], 312 }, 313 { 314 'target_name': 'content_app_both', 315 'type': 'none', 316 'dependencies': ['content'], 317 }, 318 { 319 'target_name': 'content_browser', 320 'type': 'none', 321 'dependencies': ['content'], 322 }, 323 { 324 'target_name': 'content_common', 325 'type': 'none', 326 'dependencies': ['content', 'content_resources.gyp:content_resources'], 327 # Disable c4267 warnings until we fix size_t to int truncations. 328 'msvs_disabled_warnings': [ 4267, ], 329 }, 330 { 331 'target_name': 'content_child', 332 'type': 'none', 333 'dependencies': ['content'], 334 }, 335 { 336 'target_name': 'content_gpu', 337 'type': 'none', 338 'dependencies': ['content'], 339 }, 340 { 341 'target_name': 'content_plugin', 342 'type': 'none', 343 'dependencies': ['content'], 344 }, 345 { 346 'target_name': 'content_ppapi_plugin', 347 'type': 'none', 348 'dependencies': ['content'], 349 # Disable c4267 warnings until we fix size_t to int truncations. 350 'msvs_disabled_warnings': [ 4267, ], 351 }, 352 { 353 'target_name': 'content_renderer', 354 'type': 'none', 355 'dependencies': ['content'], 356 }, 357 { 358 'target_name': 'content_utility', 359 'type': 'none', 360 'dependencies': ['content'], 361 }, 362 { 363 'target_name': 'content_worker', 364 'type': 'none', 365 'dependencies': ['content'], 366 }, 367 ], 368 }], 369 ['OS == "android"', { 370 'targets': [ 371 { 372 'target_name': 'common_aidl', 373 'type': 'none', 374 'variables': { 375 'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl', 376 }, 377 'sources': [ 378 'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 379 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 380 ], 381 'includes': [ '../build/java_aidl.gypi' ], 382 }, 383 { 384 'target_name': 'content_native_libraries_gen', 385 'type': 'none', 386 'sources': [ 387 'public/android/java/templates/NativeLibraries.template', 388 ], 389 'variables': { 390 'package_name': 'org/chromium/content/app', 391 'include_path': 'public/android/java/templates', 392 'template_deps': [ 393 'public/android/java/templates/native_libraries_array.h' 394 ], 395 }, 396 'includes': [ '../build/android/java_cpp_template.gypi' ], 397 }, 398 { 399 'target_name': 'content_java', 400 'type': 'none', 401 'dependencies': [ 402 '../base/base.gyp:base', 403 '../media/media.gyp:media_java', 404 '../net/net.gyp:net', 405 '../ui/ui.gyp:ui_java', 406 'common_aidl', 407 'content_common', 408 'page_transition_types_java', 409 'result_codes_java', 410 'speech_recognition_error_java', 411 'top_controls_state_java', 412 'content_native_libraries_gen', 413 ], 414 'variables': { 415 'java_in_dir': '../content/public/android/java', 416 'jar_excluded_classes': [ '*/NativeLibraries.class' ], 417 'has_java_resources': 1, 418 'R_package': 'org.chromium.content', 419 'R_package_relpath': 'org/chromium/content', 420 'java_strings_grd': 'android_content_strings.grd', 421 }, 422 'conditions': [ 423 ['android_webview_build == 0', { 424 'dependencies': [ 425 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java', 426 '../third_party/guava/guava.gyp:guava_javalib', 427 ], 428 }], 429 ], 430 'includes': [ '../build/java.gypi' ], 431 }, 432 { 433 'target_name': 'page_transition_types_java', 434 'type': 'none', 435 'sources': [ 436 'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template', 437 ], 438 'variables': { 439 'package_name': 'org/chromium/content/browser', 440 'template_deps': ['public/common/page_transition_types_list.h'], 441 }, 442 'includes': [ '../build/android/java_cpp_template.gypi' ], 443 }, 444 { 445 'target_name': 'result_codes_java', 446 'type': 'none', 447 'sources': [ 448 'public/android/java/src/org/chromium/content/common/ResultCodes.template', 449 ], 450 'variables': { 451 'package_name': 'org/chromium/content/common', 452 'template_deps': ['public/common/result_codes_list.h'], 453 }, 454 'includes': [ '../build/android/java_cpp_template.gypi' ], 455 }, 456 { 457 'target_name': 'speech_recognition_error_java', 458 'type': 'none', 459 'sources': [ 460 'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template', 461 ], 462 'variables': { 463 'package_name': 'org/chromium/content/browser', 464 'template_deps': ['public/common/speech_recognition_error_list.h'], 465 }, 466 'includes': [ '../build/android/java_cpp_template.gypi' ], 467 }, 468 { 469 'target_name': 'top_controls_state_java', 470 'type': 'none', 471 'sources': [ 472 'public/android/java/src/org/chromium/content/common/TopControlsState.template', 473 ], 474 'variables': { 475 'package_name': 'org/chromium/content/common', 476 'template_deps': ['public/common/top_controls_state_list.h'], 477 }, 478 'includes': [ '../build/android/java_cpp_template.gypi' ], 479 }, 480 { 481 'target_name': 'java_set_jni_headers', 482 'type': 'none', 483 'variables': { 484 'jni_gen_package': 'content', 485 'input_java_class': 'java/util/HashSet.class', 486 }, 487 'includes': [ '../build/jar_file_jni_generator.gypi' ], 488 }, 489 490 { 491 'target_name': 'content_jni_headers', 492 'type': 'none', 493 'dependencies': [ 494 'java_set_jni_headers', 495 ], 496 'direct_dependent_settings': { 497 'include_dirs': [ 498 '<(SHARED_INTERMEDIATE_DIR)/content', 499 ], 500 }, 501 'includes': [ 'content_jni.gypi' ], 502 }, 503 ], 504 }], # OS == "android" 505 ], 506 } 507