Home | History | Annotate | Download | only in snappy
      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     'conditions': [
      8       # Define an "os_include" variable that points at the OS-specific generated
      9       # headers.  These were generated by running the configure script offline.
     10       ['os_posix == 1 and OS != "mac"', {
     11         'os_include': 'linux'
     12       }],
     13       ['OS=="mac"', {'os_include': 'mac'}],
     14       ['OS=="win"', {'os_include': 'win32'}],
     15     ],
     16     'use_system_libxml%': 0,
     17   },
     18   'targets': [
     19     {
     20       'target_name': 'snappy',
     21       'type': 'static_library',
     22       'include_dirs': [
     23         '<(os_include)',
     24         'src',
     25         '../..',
     26       ],
     27       'direct_dependent_settings': {
     28         'include_dirs': [
     29           '<(os_include)',
     30           'src',
     31         ],
     32       },
     33       'sources': [
     34         'src/snappy-internal.h',
     35         'src/snappy-sinksource.cc',
     36         'src/snappy-sinksource.h',
     37         'src/snappy-stubs-internal.cc',
     38         'src/snappy-stubs-internal.h',
     39         'src/snappy.cc',
     40         'src/snappy.h',
     41       ],
     42       'conditions': [
     43         ['OS=="win"', {
     44             # Signed/unsigned comparison
     45             'msvs_disabled_warnings': [
     46               # https://code.google.com/p/snappy/issues/detail?id=71
     47               4018,
     48               # https://code.google.com/p/snappy/issues/detail?id=75
     49               4267,
     50             ],
     51           }],
     52         ['clang == 1', {
     53             # snappy-stubs-internal.h unapologetically has: using namespace std
     54             # https://code.google.com/p/snappy/issues/detail?id=70
     55             'xcode_settings': {
     56               'WARNING_CFLAGS!': [ '-Wheader-hygiene' ],
     57             },
     58             'cflags!': [ '-Wheader-hygiene' ],
     59           }],
     60       ],
     61     },
     62     {
     63       'target_name': 'snappy_unittest',
     64       'type': 'executable',
     65       'sources': [
     66         'src/snappy-test.cc',
     67         'src/snappy-test.h',
     68         'src/snappy_unittest.cc',
     69       ],
     70       'dependencies': [
     71         'snappy',
     72         '../../base/base.gyp:base',
     73         '../../testing/gtest.gyp:gtest',
     74         '../../third_party/zlib/zlib.gyp:zlib',
     75       ],
     76     },
     77   ],
     78 }
     79