OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'conditions': [ | 7 'conditions': [ |
8 [ 'os_posix == 1 and OS != "mac" and OS != "openbsd"', { | 8 [ 'os_posix == 1 and OS != "mac" and OS != "openbsd"', { |
9 # Link to system .so since we already use it due to GTK. | 9 # Link to system .so since we already use it due to GTK. |
10 # TODO(pvalchev): OpenBSD is purposefully left out, as the system | 10 # TODO(pvalchev): OpenBSD is purposefully left out, as the system |
11 # zlib brings up an incompatibility that breaks rendering. | 11 # zlib brings up an incompatibility that breaks rendering. |
12 'use_system_zlib%': 1, | 12 'use_system_zlib%': 1, |
13 }, { # os_posix != 1 or OS == "mac" or OS == "openbsd" | 13 }, { # os_posix != 1 or OS == "mac" or OS == "openbsd" |
14 'use_system_zlib%': 0, | 14 'use_system_zlib%': 0, |
15 }], | 15 }], |
16 ], | 16 ], |
17 }, | 17 }, |
18 'conditions': [ | 18 'targets': [ |
19 ['use_system_zlib==0', { | 19 { |
20 'targets': [ | 20 'target_name': 'zlib', |
21 { | 21 'type': 'static_library', |
22 'target_name': 'zlib', | 22 'conditions': [ |
23 'type': 'static_library', | 23 ['use_system_zlib==0', { |
24 'sources': [ | 24 'sources': [ |
25 'contrib/minizip/ioapi.c', | 25 'contrib/minizip/ioapi.c', |
26 'contrib/minizip/ioapi.h', | 26 'contrib/minizip/ioapi.h', |
27 'contrib/minizip/iowin32.c', | 27 'contrib/minizip/iowin32.c', |
28 'contrib/minizip/iowin32.h', | 28 'contrib/minizip/iowin32.h', |
29 'contrib/minizip/unzip.c', | 29 'contrib/minizip/unzip.c', |
30 'contrib/minizip/unzip.h', | 30 'contrib/minizip/unzip.h', |
31 'contrib/minizip/zip.c', | 31 'contrib/minizip/zip.c', |
32 'contrib/minizip/zip.h', | 32 'contrib/minizip/zip.h', |
33 'adler32.c', | 33 'adler32.c', |
(...skipping 30 matching lines...) Expand all Loading... |
64 '.', | 64 '.', |
65 ], | 65 ], |
66 }, | 66 }, |
67 'conditions': [ | 67 'conditions': [ |
68 ['OS!="win"', { | 68 ['OS!="win"', { |
69 'product_name': 'chrome_zlib', | 69 'product_name': 'chrome_zlib', |
70 'sources!': [ | 70 'sources!': [ |
71 'contrib/minizip/iowin32.c' | 71 'contrib/minizip/iowin32.c' |
72 ], | 72 ], |
73 }], | 73 }], |
74 ['OS=="mac" or os_bsd==1 or OS=="android"', { | |
75 # Mac, Android and the BSDs don't have fopen64, ftello64, or | |
76 # fseeko64. We use fopen, ftell, and fseek instead on these | |
77 # systems. | |
78 'defines': [ | |
79 'USE_FILE32API' | |
80 ], | |
81 }], | |
82 ['clang==1', { | |
83 'xcode_settings': { | |
84 'WARNING_CFLAGS': [ | |
85 # zlib uses `if ((a == b))` for some reason. | |
86 '-Wno-parentheses-equality', | |
87 ], | |
88 }, | |
89 'cflags': [ | |
90 '-Wno-parentheses-equality', | |
91 ], | |
92 }], | |
93 ], | 74 ], |
94 }, | 75 }, { |
95 ], | |
96 }, { | |
97 'targets': [ | |
98 { | |
99 'target_name': 'zlib', | |
100 'type': 'static_library', | |
101 'direct_dependent_settings': { | 76 'direct_dependent_settings': { |
102 'defines': [ | 77 'defines': [ |
103 'USE_SYSTEM_ZLIB', | 78 'USE_SYSTEM_ZLIB', |
104 ], | 79 ], |
105 }, | 80 }, |
106 'defines': [ | 81 'defines': [ |
107 'USE_SYSTEM_ZLIB', | 82 'USE_SYSTEM_ZLIB', |
108 ], | 83 ], |
109 'sources': [ | 84 'sources': [ |
110 'contrib/minizip/ioapi.c', | 85 'contrib/minizip/ioapi.c', |
111 'contrib/minizip/ioapi.h', | 86 'contrib/minizip/ioapi.h', |
112 'contrib/minizip/unzip.c', | 87 'contrib/minizip/unzip.c', |
113 'contrib/minizip/unzip.h', | 88 'contrib/minizip/unzip.h', |
114 'contrib/minizip/zip.c', | 89 'contrib/minizip/zip.c', |
115 'contrib/minizip/zip.h', | 90 'contrib/minizip/zip.h', |
116 ], | 91 ], |
117 'conditions': [ | 92 'conditions': [ |
118 ['OS=="mac" or os_bsd==1 or OS=="android"', { | |
119 # Mac, Android and the BSDs don't have fopen64, ftello64, or | |
120 # fseeko64. We use fopen, ftell, and fseek instead on these | |
121 # systems. | |
122 'defines': [ | |
123 'USE_FILE32API' | |
124 ], | |
125 }], | |
126 ['OS=="android"', { | 93 ['OS=="android"', { |
127 'toolsets': ['target', 'host'], | 94 'toolsets': ['target', 'host'], |
128 }], | 95 }], |
129 ], | 96 ], |
130 'link_settings': { | 97 'link_settings': { |
131 'libraries': [ | 98 'libraries': [ |
132 '-lz', | 99 '-lz', |
133 ], | 100 ], |
134 }, | 101 }, |
135 }, | 102 }], |
| 103 ['OS=="mac" or os_bsd==1 or OS=="android"', { |
| 104 # Mac, Android and the BSDs don't have fopen64, ftello64, or |
| 105 # fseeko64. We use fopen, ftell, and fseek instead on these |
| 106 # systems. |
| 107 'defines': [ |
| 108 'USE_FILE32API' |
| 109 ], |
| 110 }], |
| 111 ['clang==1', { |
| 112 'xcode_settings': { |
| 113 'WARNING_CFLAGS': [ |
| 114 # zlib uses `if ((a == b))` for some reason. |
| 115 '-Wno-parentheses-equality', |
| 116 ], |
| 117 }, |
| 118 'cflags': [ |
| 119 '-Wno-parentheses-equality', |
| 120 ], |
| 121 }], |
136 ], | 122 ], |
137 }], | 123 } |
138 ], | 124 ], |
139 } | 125 } |
OLD | NEW |