Don't preload rarely seen large images
[chromium-blink-merge.git] / third_party / snappy / snappy.gyp
blobac0186f5da70bc03d43438e516b2802fb1c142e5
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.
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       'variables': {
34         'clang_warning_flags_unset': [
35           # snappy-stubs-internal.h unapologetically has: using namespace std
36           # https://code.google.com/p/snappy/issues/detail?id=70
37           '-Wheader-hygiene',
38         ],
39       },
40       'sources': [
41         'src/snappy-internal.h',
42         'src/snappy-sinksource.cc',
43         'src/snappy-sinksource.h',
44         'src/snappy-stubs-internal.cc',
45         'src/snappy-stubs-internal.h',
46         'src/snappy.cc',
47         'src/snappy.h',
48       ],
49       'conditions': [
50         ['OS=="linux" or OS=="mac"', {
51           'defines': [
52             # TODO(tfarina): Only Mac and Linux has the generated config.h for
53             # now. Generate the config.h for Windows too and enable this there
54             # as well.
55             'HAVE_CONFIG_H=1',
56           ],
57         }],
58         ['OS=="win"', {
59           # Signed/unsigned comparison
60           'msvs_disabled_warnings': [
61             # https://code.google.com/p/snappy/issues/detail?id=71
62             4018,
63             # https://code.google.com/p/snappy/issues/detail?id=75
64             4267,
65           ],
66         }],
67       ],
68     },
69     {
70       'target_name': 'snappy_unittest',
71       'type': 'executable',
72       'sources': [
73         'src/snappy-test.cc',
74         'src/snappy-test.h',
75         'src/snappy_unittest.cc',
76       ],
77       'dependencies': [
78         'snappy',
79         '../../base/base.gyp:base',
80         '../../testing/gtest.gyp:gtest',
81         '../../third_party/zlib/zlib.gyp:zlib',
82       ],
83       'variables': {
84         'clang_warning_flags': [ '-Wno-return-type' ],
85         'clang_warning_flags_unset': [ '-Wheader-hygiene' ],
86       },
87       'conditions': [
88         ['OS=="linux" or OS=="mac"', {
89           'defines': [
90             # TODO(tfarina): Only Mac and Linux has the generated config.h for
91             # now. Generate the config.h for Windows too and enable this there
92             # as well.
93             'HAVE_CONFIG_H=1',
94           ],
95         }],
96       ],
97     },
98   ],