Home | History | Annotate | Download | only in web
      1 #
      2 # Copyright (C) 2011 Google Inc. All rights reserved.
      3 #
      4 # Redistribution and use in source and binary forms, with or without
      5 # modification, are permitted provided that the following conditions are
      6 # met:
      7 #
      8 #         * Redistributions of source code must retain the above copyright
      9 # notice, this list of conditions and the following disclaimer.
     10 #         * Redistributions in binary form must reproduce the above
     11 # copyright notice, this list of conditions and the following disclaimer
     12 # in the documentation and/or other materials provided with the
     13 # distribution.
     14 #         * Neither the name of Google Inc. nor the names of its
     15 # contributors may be used to endorse or promote products derived from
     16 # this software without specific prior written permission.
     17 #
     18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     29 #
     30 
     31 {
     32     'includes': [
     33         '../build/win/precompile.gypi',
     34         '../bindings/bindings.gypi',
     35         '../core/core.gypi',
     36         '../core/features.gypi',
     37         '../modules/modules.gypi',
     38         '../wtf/wtf.gypi',
     39         'web.gypi',
     40     ],
     41     'targets': [
     42         {
     43             'target_name': 'webkit',
     44             'type': '<(component)',
     45             'variables': { 'enable_wexit_time_destructors': 1, },
     46             'dependencies': [
     47                 '../core/core.gyp:webcore',
     48                 '../modules/modules.gyp:modules',
     49                 '<(DEPTH)/skia/skia.gyp:skia',
     50                 '<(DEPTH)/third_party/angle_dx11/src/build_angle.gyp:translator_glsl',
     51                 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
     52                 '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
     53                 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
     54                 'blink_common',
     55             ],
     56             'export_dependent_settings': [
     57                 '<(DEPTH)/skia/skia.gyp:skia',
     58                 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
     59                 '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
     60                 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
     61             ],
     62             'include_dirs': [
     63                 '../../public/web',
     64                 '../web',
     65                 '<(DEPTH)/third_party/angle_dx11/include',
     66                 '<(DEPTH)/third_party/skia/include/utils',
     67             ],
     68             'defines': [
     69                 'WEBKIT_IMPLEMENTATION=1',
     70                 'INSIDE_WEBKIT',
     71             ],
     72             'sources': [
     73                 '<@(webcore_platform_support_files)',
     74                 '<@(web_files)',
     75             ],
     76             'conditions': [
     77                 ['component=="shared_library"', {
     78                     'dependencies': [
     79                         '../core/core.gyp:webcore_derived',
     80                         '../core/core.gyp:webcore_test_support',
     81                         '<(DEPTH)/base/base.gyp:test_support_base',
     82                         '<(DEPTH)/testing/gmock.gyp:gmock',
     83                         '<(DEPTH)/testing/gtest.gyp:gtest',
     84                         '<(DEPTH)/third_party/icu/icu.gyp:*',
     85                         '<(libjpeg_gyp_path):libjpeg',
     86                         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
     87                         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
     88                         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
     89                         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
     90                         '<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
     91                         '<(DEPTH)/third_party/ots/ots.gyp:ots',
     92                         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
     93                         '<(DEPTH)/url/url.gyp:url_lib',
     94                         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
     95                         # We must not add webkit_support here because of cyclic dependency.
     96                     ],
     97                     'export_dependent_settings': [
     98                         '<(DEPTH)/url/url.gyp:url_lib',
     99                         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
    100                     ],
    101                     'include_dirs': [
    102                         # WARNING: Do not view this particular case as a precedent for
    103                         # including WebCore headers in DumpRenderTree project.
    104                         '../core/testing/v8', # for WebCoreTestSupport.h, needed to link in window.internals code.
    105                     ],
    106                     'sources': [
    107                         '<@(bindings_unittest_files)',
    108                         '<@(core_unittest_files)',
    109                         '<@(modules_unittest_files)',
    110                         '<@(web_unittest_files)',
    111                         'WebTestingSupport.cpp',
    112                         'tests/WebUnitTests.cpp',   # Components test runner support.
    113                     ],
    114                     'conditions': [
    115                         ['OS=="win" or OS=="mac"', {
    116                             'dependencies': [
    117                                 '<(DEPTH)/third_party/nss/nss.gyp:*',
    118                             ],
    119                         }],
    120                         ['clang==1', {
    121                             # FIXME: It would be nice to enable this in shared builds too,
    122                             # but the test files have global constructors from the GTEST macro
    123                             # and we pull in the test files into the webkit target in the
    124                             # shared build.
    125                             'cflags!': ['-Wglobal-constructors'],
    126                             'xcode_settings': {
    127                               'WARNING_CFLAGS!': ['-Wglobal-constructors'],
    128                             },
    129                         }],
    130                     ],
    131                     'msvs_settings': {
    132                       'VCLinkerTool': {
    133                         'conditions': [
    134                           ['incremental_chrome_dll==1', {
    135                             'UseLibraryDependencyInputs': "true",
    136                           }],
    137                         ],
    138                       },
    139                     },
    140                 }],
    141                 ['OS == "linux"', {
    142                     'dependencies': [
    143                         '<(DEPTH)/build/linux/system.gyp:fontconfig',
    144                     ],
    145                     'include_dirs': [
    146                         '../../public/web/linux',
    147                     ],
    148                 }, {
    149                     'sources/': [
    150                         ['exclude', 'linux/'],
    151                     ],
    152                 }],
    153                 ['use_x11 == 1', {
    154                     'dependencies': [
    155                         '<(DEPTH)/build/linux/system.gyp:x11',
    156                     ],
    157                     'include_dirs': [
    158                         '../../public/web/x11',
    159                     ],
    160                 }, {
    161                     'sources/': [
    162                         ['exclude', 'x11/'],
    163                     ]
    164                 }],
    165                 ['toolkit_uses_gtk == 1', {
    166                     'dependencies': [
    167                         '<(DEPTH)/build/linux/system.gyp:gtk',
    168                     ],
    169                     'include_dirs': [
    170                         '../../public/web/gtk',
    171                     ],
    172                 }, { # else: toolkit_uses_gtk != 1
    173                     'sources/': [
    174                         ['exclude', 'gtk/'],
    175                     ],
    176                 }],
    177                 ['OS=="android"', {
    178                     'include_dirs': [
    179                         '../../public/web/android',
    180                         '../../public/web/linux', # We need linux/WebFontRendering.h on Android.
    181                     ],
    182                 }, { # else: OS!="android"
    183                     'sources/': [
    184                         ['exclude', 'android/'],
    185                     ],
    186                 }],
    187                 ['OS=="mac"', {
    188                     'include_dirs': [
    189                         '../../public/web/mac',
    190                     ],
    191                     'link_settings': {
    192                         'libraries': [
    193                             '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
    194                             '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
    195                         ],
    196                     },
    197                 }, { # else: OS!="mac"
    198                     'sources/': [
    199                         ['exclude', 'mac/'],
    200                     ],
    201                 }],
    202                 ['OS=="win"', {
    203                     'include_dirs': [
    204                         '../../public/web/win',
    205                     ],
    206                 }, { # else: OS!="win"
    207                     'sources/': [
    208                         ['exclude', 'win/']
    209                     ],
    210                     'variables': {
    211                         # FIXME: Turn on warnings on Windows.
    212                         'chromium_code': 1,
    213                     }
    214                 }],
    215                 ['use_default_render_theme==1', {
    216                     'include_dirs': [
    217                         '../../public/web/default',
    218                     ],
    219                 }, { # else use_default_render_theme==0
    220                     'sources/': [
    221                         ['exclude', 'default/WebRenderTheme.cpp'],
    222                     ],
    223                 }],
    224             ],
    225             'direct_dependent_settings': {
    226                 'include_dirs': [
    227                     '../../',
    228                 ],
    229             },
    230             'target_conditions': [
    231                 ['OS=="android"', {
    232                     'sources/': [
    233                         ['include', '^linux/WebFontRendering\\.cpp$'],
    234                         ['include', '^linux/WebFontRenderStyle\\.cpp$'],
    235                     ],
    236                 }],
    237             ],
    238         },
    239         {
    240             'target_name': 'webkit_test_support',
    241             'conditions': [
    242                 ['component=="shared_library"', {
    243                     'type': 'none',
    244                 }, {
    245                     'type': 'static_library',
    246                     'dependencies': [
    247                         '../core/core.gyp:webcore_test_support',
    248                         '../wtf/wtf.gyp:wtf',
    249                         '<(DEPTH)/skia/skia.gyp:skia',
    250                     ],
    251                     'include_dirs': [
    252                         '../../public/web',
    253                         '../core/testing/v8', # for WebCoreTestSupport.h, needed to link in window.internals code.
    254                         '../../',
    255                     ],
    256                     'sources': [
    257                         'WebTestingSupport.cpp',
    258                     ],
    259                 }],
    260             ],
    261         },
    262         {
    263             'target_name': 'blink_common',
    264             'type': '<(component)',
    265             'variables': { 'enable_wexit_time_destructors': 1 },
    266             'dependencies': [
    267                 '../wtf/wtf.gyp:wtf',
    268                 '<(DEPTH)/skia/skia.gyp:skia',
    269                 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
    270             ],
    271             'export_dependent_settings': [
    272               '<(DEPTH)/skia/skia.gyp:skia',
    273               '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
    274             ],
    275             'defines': [
    276                 'INSIDE_WEBKIT',
    277                 'BLINK_COMMON_IMPLEMENTATION=1',
    278             ],
    279             'include_dirs': [
    280                 '..',
    281                 '../..',
    282             ],
    283             'sources': [
    284                 '../core/platform/chromium/support/WebCString.cpp',
    285                 '../core/platform/chromium/support/WebString.cpp',
    286                 'WebCommon.cpp',
    287             ],
    288         },
    289     ], # targets
    290     'conditions': [
    291         ['gcc_version>=46', {
    292             'target_defaults': {
    293                 # Disable warnings about c++0x compatibility, as some names (such
    294                 # as nullptr) conflict with upcoming c++0x types.
    295                 'cflags_cc': ['-Wno-c++0x-compat'],
    296             },
    297         }],
    298         ['OS=="mac"', {
    299             'targets': [
    300                 {
    301                     'target_name': 'copy_mesa',
    302                     'type': 'none',
    303                     'dependencies': ['<(DEPTH)/third_party/mesa/mesa.gyp:osmesa'],
    304                     'copies': [{
    305                         'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/MacOS/',
    306                         'files': ['<(PRODUCT_DIR)/osmesa.so'],
    307                     }],
    308                 },
    309             ],
    310         }],
    311         ['clang==1', {
    312             'target_defaults': {
    313                 'cflags': ['-Wglobal-constructors'],
    314                 'xcode_settings': {
    315                     'WARNING_CFLAGS': ['-Wglobal-constructors'],
    316                 },
    317             },
    318         }],
    319     ], # conditions
    320 }
    321