Home | History | Annotate | Download | only in ppapi
      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   },
      9   'target_defaults': {
     10     'conditions': [
     11       # Linux shared libraries should always be built -fPIC.
     12       #
     13       # TODO(ajwong): For internal pepper plugins, which are statically linked
     14       # into chrome, do we want to build w/o -fPIC?  If so, how can we express
     15       # that in the build system?
     16       ['os_posix==1 and OS!="android" and OS!="mac"', {
     17         'cflags': ['-fPIC', '-fvisibility=hidden'],
     18 
     19         # This is needed to make the Linux shlib build happy. Without this,
     20         # -fvisibility=hidden gets stripped by the exclusion in common.gypi
     21         # that is triggered when a shared library build is specified.
     22         'cflags/': [['include', '^-fvisibility=hidden$']],
     23       }],
     24     ],
     25   },
     26   'includes': [
     27     'ppapi_sources.gypi',
     28     'ppapi_host.gypi',
     29     'ppapi_ipc.gypi',
     30     'ppapi_proxy.gypi',
     31     'ppapi_shared.gypi',
     32     'ppapi_tests.gypi',
     33   ],
     34   'targets': [
     35     {
     36       'target_name': 'ppapi_shared',
     37       'type': '<(component)',
     38       'variables': {
     39         # Set the ppapi_shared_target variable, so that we will pull in the
     40         # sources from ppapi_shared.gypi (and only from there). We follow the
     41         # same pattern for the other targets defined within this file.
     42         'ppapi_shared_target': 1,
     43       },
     44       'dependencies': [
     45         '../base/base.gyp:base',
     46         '../base/base.gyp:base_i18n',
     47         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
     48         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
     49         '../gpu/gpu.gyp:command_buffer_client',
     50         '../gpu/gpu.gyp:gles2_implementation',
     51         '../ipc/ipc.gyp:ipc',
     52         '../media/media.gyp:shared_memory_support',
     53         '../skia/skia.gyp:skia',
     54         '../third_party/icu/icu.gyp:icuuc',
     55         '../ui/events/events.gyp:events_base',
     56         '../ui/surface/surface.gyp:surface',
     57         '../url/url.gyp:url_lib',
     58         'ppapi.gyp:ppapi_c',
     59       ],
     60       'export_dependent_settings': [
     61         '../base/base.gyp:base',
     62       ],
     63       'conditions': [
     64         ['OS=="mac"', {
     65           'link_settings': {
     66             'libraries': [
     67               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
     68             ],
     69           },
     70         }],
     71         ['chrome_multiple_dll==1', {
     72           'dependencies': [
     73             '../third_party/WebKit/public/blink.gyp:blink_minimal',
     74           ],
     75           'export_dependent_settings': [
     76             '../third_party/WebKit/public/blink.gyp:blink_minimal',
     77           ],
     78         }, {
     79           'dependencies': [
     80             '../third_party/WebKit/public/blink.gyp:blink',
     81           ],
     82           'export_dependent_settings': [
     83             '../third_party/WebKit/public/blink.gyp:blink',
     84           ],
     85         }],
     86       ],
     87       # Disable c4267 warnings until we fix size_t to int truncations.
     88       'msvs_disabled_warnings': [ 4267, ],
     89     },
     90   ],
     91   'conditions': [
     92     ['component=="static_library"', {
     93       # In a static build, build ppapi_ipc separately.
     94       'targets': [
     95         {
     96           'target_name': 'ppapi_ipc',
     97           'type': 'static_library',
     98           'variables': {
     99             'ppapi_ipc_target': 1,
    100           },
    101           'dependencies': [
    102             '../base/base.gyp:base',
    103             '../gpu/gpu.gyp:gpu_ipc',
    104             '../ipc/ipc.gyp:ipc',
    105             '../skia/skia.gyp:skia',
    106             '../ui/events/ipc/events_ipc.gyp:events_ipc',
    107             'ppapi.gyp:ppapi_c',
    108             'ppapi_shared',
    109           ],
    110           'all_dependent_settings': {
    111             'include_dirs': [
    112                 '..',
    113             ],
    114           },
    115         },
    116         {
    117           'target_name': 'ppapi_proxy',
    118           'type': 'static_library',
    119           'variables': {
    120             'ppapi_proxy_target': 1,
    121           },
    122           'dependencies': [
    123             '../base/base.gyp:base',
    124             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    125             '../gpu/gpu.gyp:gles2_implementation',
    126             '../gpu/gpu.gyp:gpu_ipc',
    127             '../media/media.gyp:shared_memory_support',
    128             '../ipc/ipc.gyp:ipc',
    129             '../skia/skia.gyp:skia',
    130             '../third_party/icu/icu.gyp:icuuc',
    131             '../third_party/icu/icu.gyp:icui18n',
    132             '../ui/events/events.gyp:events_base',
    133             '../ui/surface/surface.gyp:surface',
    134             'ppapi.gyp:ppapi_c',
    135             'ppapi_shared',
    136             'ppapi_ipc',
    137           ],
    138           'all_dependent_settings': {
    139             'include_dirs': [
    140                 '..',
    141             ],
    142           },
    143           # Disable c4267 warnings until we fix size_t to int truncations.
    144           'msvs_disabled_warnings': [ 4267, ],
    145           'conditions': [
    146             ['chrome_multiple_dll==1', {
    147               'dependencies': [
    148                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
    149               ],
    150             }, {
    151               'dependencies': [
    152                 '../third_party/WebKit/public/blink.gyp:blink',
    153               ],
    154             }],
    155           ],
    156         },
    157       ],
    158     },
    159     { # component != static_library
    160       # In the component build, we'll just build ppapi_ipc in to ppapi_proxy.
    161       'targets': [
    162         {
    163           'target_name': 'ppapi_proxy',
    164           'type': 'shared_library',
    165           'variables': {
    166             # Setting both variables means we pull in the sources from both
    167             # ppapi_ipc.gypi and ppapi_proxy.gypi.
    168             'ppapi_ipc_target': 1,
    169             'ppapi_proxy_target': 1,
    170           },
    171           'dependencies': [
    172             '../base/base.gyp:base',
    173             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    174             '../gpu/gpu.gyp:gles2_implementation',
    175             '../gpu/gpu.gyp:gpu_ipc',
    176             '../media/media.gyp:shared_memory_support',
    177             '../ipc/ipc.gyp:ipc',
    178             '../skia/skia.gyp:skia',
    179             '../third_party/icu/icu.gyp:icuuc',
    180             '../third_party/icu/icu.gyp:icui18n',
    181             '../ui/events/events.gyp:events_base',
    182             '../ui/events/ipc/events_ipc.gyp:events_ipc',
    183             '../ui/surface/surface.gyp:surface',
    184             'ppapi.gyp:ppapi_c',
    185             'ppapi_shared',
    186           ],
    187           'all_dependent_settings': {
    188             'include_dirs': [
    189                 '..',
    190             ],
    191           },
    192           # Disable c4267 warnings until we fix size_t to int truncations.
    193           'msvs_disabled_warnings': [ 4267, ],
    194           'conditions': [
    195             ['chrome_multiple_dll==1', {
    196               'dependencies': [
    197                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
    198               ],
    199             }, {
    200               'dependencies': [
    201                 '../third_party/WebKit/public/blink.gyp:blink',
    202               ],
    203             }],
    204           ],
    205         },
    206         {
    207           # In component build, this is just a phony target that makes sure
    208           # ppapi_proxy is built, since that's where the ipc sources go in the
    209           # component build.
    210           'target_name': 'ppapi_ipc',
    211           'type': 'none',
    212           'dependencies': [
    213             'ppapi_proxy',
    214           ],
    215         },
    216       ],
    217     }],
    218     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
    219       # In windows builds, we also want to define some targets to build in
    220       # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit
    221       # Windows).
    222       'targets': [
    223         {
    224           'target_name': 'ppapi_shared_win64',
    225           'type': '<(component)',
    226           'variables': {
    227             'nacl_win64_target': 1,
    228             'ppapi_shared_target': 1,
    229           },
    230           'dependencies': [
    231             'ppapi.gyp:ppapi_c',
    232             '../base/base.gyp:base_win64',
    233             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
    234             '../gpu/gpu.gyp:command_buffer_common_win64',
    235             '../ipc/ipc.gyp:ipc_win64',
    236             '../ui/events/latency_info_nacl.gyp:latency_info_nacl_win64',
    237           ],
    238           'defines': [
    239             '<@(nacl_win64_defines)',
    240           ],              
    241           'export_dependent_settings': [
    242             '../base/base.gyp:base_win64',
    243           ],
    244           'configurations': {
    245             'Common_Base': {
    246               'msvs_target_platform': 'x64',
    247             },
    248           },
    249         },
    250         {
    251           'target_name': 'ppapi_ipc_win64',
    252           'type': 'static_library',
    253           'variables': {
    254             'nacl_win64_target': 1,
    255             'ppapi_ipc_target': 1,
    256           },
    257           'dependencies': [
    258             '../base/base.gyp:base_win64',
    259             '../ipc/ipc.gyp:ipc_win64',
    260             '../gpu/gpu.gyp:gpu_ipc_win64',
    261             '../ui/events/latency_info_nacl.gyp:latency_info_nacl_win64',
    262             'ppapi.gyp:ppapi_c',
    263             'ppapi_shared_win64',
    264           ],
    265           'export_dependent_settings': [
    266             '../gpu/gpu.gyp:gpu_ipc_win64',
    267           ],
    268           'defines': [
    269             '<@(nacl_win64_defines)',
    270           ],              
    271           'all_dependent_settings': {
    272             'include_dirs': [
    273                '..',
    274             ],
    275           },
    276           'configurations': {
    277             'Common_Base': {
    278               'msvs_target_platform': 'x64',
    279             },
    280           },
    281       }],
    282     }],
    283   ],
    284 }
    285