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