Home | History | Annotate | Download | only in components
      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   'targets': [
      7     {
      8       'target_name': 'breakpad_component_lib',
      9       'type': 'static_library',
     10       'sources': [
     11         'breakpad/app/breakpad_client.cc',
     12         'breakpad/app/breakpad_client.h',
     13         'breakpad/app/crash_keys_win.cc',
     14         'breakpad/app/crash_keys_win.h',
     15       ],
     16       'include_dirs': [
     17         '..',
     18         '../breakpad/src',
     19       ],
     20     },
     21     {
     22       'variables': {
     23         'conditions': [
     24           ['OS == "ios" ', {
     25             # On IOS there are no files compiled into the library, and we
     26             # can't have libraries with zero objects.
     27             'breakpad_component_target_type%': 'none',
     28           }, {
     29             'breakpad_component_target_type%': 'static_library',
     30           }],
     31         ],
     32       },
     33       # Note: if you depend on this target, you need to either link in
     34       # content.gyp:content_common, or add
     35       # content/public/common/content_switches.cc to your sources.
     36       'target_name': 'breakpad_component',
     37       'type': '<(breakpad_component_target_type)',
     38       'sources': [
     39         'breakpad/app/breakpad_linux.cc',
     40         'breakpad/app/breakpad_linux.h',
     41         'breakpad/app/breakpad_linux_impl.h',
     42         'breakpad/app/breakpad_mac.h',
     43         'breakpad/app/breakpad_mac.mm',
     44         'breakpad/app/breakpad_win.cc',
     45         'breakpad/app/breakpad_win.h',
     46         'breakpad/app/hard_error_handler_win.cc',
     47         'breakpad/app/hard_error_handler_win.h',
     48       ],
     49       'dependencies': [
     50         'breakpad_component_lib',
     51         '../base/base.gyp:base',
     52       ],
     53       'defines': ['BREAKPAD_IMPLEMENTATION'],
     54       'conditions': [
     55         ['OS=="mac"', {
     56           'dependencies': [
     57             '../breakpad/breakpad.gyp:breakpad',
     58           ],
     59         }],
     60         ['OS=="win"', {
     61           'dependencies': [
     62             '../breakpad/breakpad.gyp:breakpad_handler',
     63             '../breakpad/breakpad.gyp:breakpad_sender',
     64             '../sandbox/sandbox.gyp:sandbox',
     65           ],
     66         }],
     67         ['os_posix == 1 and OS != "mac" and OS != "ios" and android_webview_build != 1', {
     68           'dependencies': [
     69             '../breakpad/breakpad.gyp:breakpad_client',
     70           ],
     71           'include_dirs': [
     72             '../breakpad/src',
     73           ],
     74         }],
     75       ],
     76       'target_conditions': [
     77         # Need 'target_conditions' to override default filename_rules to include
     78         # the files on Android.
     79         ['OS=="android"', {
     80           'sources/': [
     81             ['include', '^breakpad/app/breakpad_linux\\.cc$'],
     82           ],
     83         }],
     84       ],
     85     },
     86     {
     87       'target_name': 'breakpad_test_support',
     88       'type': 'none',
     89       'dependencies': [
     90         'breakpad_component_lib',
     91       ],
     92       'direct_dependent_settings': {
     93         'include_dirs' : [
     94           '../breakpad/src',
     95         ],
     96       }
     97     },
     98   ],
     99   'conditions': [
    100     ['OS=="win"', {
    101       'targets': [
    102         {
    103           'target_name': 'breakpad_crash_service',
    104           'type': 'static_library',
    105           'dependencies': [
    106             '../base/base.gyp:base',
    107             '../breakpad/breakpad.gyp:breakpad_handler',
    108             '../breakpad/breakpad.gyp:breakpad_sender',
    109           ],
    110           'sources': [
    111             'breakpad/tools/crash_service.cc',
    112             'breakpad/tools/crash_service.h',
    113           ],
    114         },
    115       ],
    116     }],
    117     ['OS=="win" and target_arch=="ia32"', {
    118       'targets': [
    119         {
    120           # Note: if you depend on this target, you need to either link in
    121           # content.gyp:content_common, or add
    122           # content/public/common/content_switches.cc to your sources.
    123           'target_name': 'breakpad_win64',
    124           'type': 'static_library',
    125           'sources': [
    126             'breakpad/app/breakpad_client.cc',
    127             'breakpad/app/breakpad_client.h',
    128             'breakpad/app/breakpad_linux.cc',
    129             'breakpad/app/breakpad_linux.h',
    130             'breakpad/app/breakpad_linux_impl.h',
    131             'breakpad/app/breakpad_mac.h',
    132             'breakpad/app/breakpad_mac.mm',
    133             'breakpad/app/breakpad_win.cc',
    134             'breakpad/app/breakpad_win.h',
    135             # TODO(siggi): test the x64 version too.
    136             'breakpad/app/crash_keys_win.cc',
    137             'breakpad/app/crash_keys_win.h',
    138             'breakpad/app/hard_error_handler_win.cc',
    139             'breakpad/app/hard_error_handler_win.h',
    140           ],
    141           'defines': [
    142             'COMPILE_CONTENT_STATICALLY',
    143             'BREAKPAD_IMPLEMENTATION',
    144           ],
    145           'dependencies': [
    146             '../base/base.gyp:base_win64',
    147             '../breakpad/breakpad.gyp:breakpad_handler_win64',
    148             '../breakpad/breakpad.gyp:breakpad_sender_win64',
    149             '../sandbox/sandbox.gyp:sandbox_win64',
    150           ],
    151           'configurations': {
    152             'Common_Base': {
    153               'msvs_target_platform': 'x64',
    154             },
    155           },
    156         },
    157         {
    158           'target_name': 'breakpad_crash_service_win64',
    159           'type': 'static_library',
    160           'dependencies': [
    161             '../base/base.gyp:base_win64',
    162             '../breakpad/breakpad.gyp:breakpad_handler_win64',
    163             '../breakpad/breakpad.gyp:breakpad_sender_win64',
    164           ],
    165           'sources': [
    166             'breakpad/tools/crash_service.cc',
    167             'breakpad/tools/crash_service.h',
    168           ],
    169           'configurations': {
    170             'Common_Base': {
    171               'msvs_target_platform': 'x64',
    172             },
    173           },
    174         },
    175       ],
    176     }],
    177     ['OS=="mac"', {
    178       'targets': [
    179         {
    180           'target_name': 'breakpad_stubs',
    181           'type': 'static_library',
    182           'dependencies': [
    183             '../base/base.gyp:base',
    184           ],
    185           'sources': [
    186             'breakpad/app/breakpad_client.cc',
    187             'breakpad/app/breakpad_client.h',
    188             'breakpad/app/breakpad_mac.h',
    189             'breakpad/app/breakpad_mac_stubs.mm',
    190           ],
    191         },
    192       ],
    193     }],
    194     ['os_posix == 1 and OS != "mac" and OS != "ios" and android_webview_build != 1', {
    195       'targets': [
    196         {
    197           'target_name': 'breakpad_host',
    198           'type': 'static_library',
    199           'dependencies': [
    200             'breakpad_component',
    201             '../base/base.gyp:base',
    202             '../breakpad/breakpad.gyp:breakpad_client',
    203             '../content/content.gyp:content_browser',
    204             '../content/content.gyp:content_common',
    205           ],
    206           'sources': [
    207             'breakpad/browser/crash_dump_manager_android.cc',
    208             'breakpad/browser/crash_dump_manager_android.h',
    209             'breakpad/browser/crash_handler_host_linux.cc',
    210             'breakpad/browser/crash_handler_host_linux.h',
    211           ],
    212           'include_dirs': [
    213             '../breakpad/src',
    214           ],
    215           'target_conditions': [
    216             # Need 'target_conditions' to override default filename_rules to include
    217             # the files on Android.
    218             ['OS=="android"', {
    219               'sources/': [
    220                 ['include', '^breakpad/browser/crash_handler_host_linux\\.cc$'],
    221               ],
    222             }],
    223           ],
    224         },
    225       ],
    226     }],
    227   ],
    228 }
    229