Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 6 # for details. All rights reserved. Use of this source code is governed by a | |
| 7 # BSD-style license that can be found in the LICENSE file. | |
| 8 | |
| 9 # This file is a modified copy of src/third_party/zlib/zlib.gyp from Chromium. | |
| 10 # Revision 165464 (this should agree with "nss_rev" in DEPS). | |
| 11 { | |
| 12 'includes': [ # Added by Dart. | |
|
Mads Ager (google)
2012/11/02 13:56:35
Ditto
| |
| 13 '../../tools/gyp/runtime-configurations.gypi', | |
| 14 '../../tools/gyp/nss_configurations.gypi', | |
| 15 ], | |
| 16 'variables': { | |
| 17 'zlib_path': '../../../third_party/zlib', # Added by Dart. | |
| 18 'conditions': [ | |
| 19 [ 'OS=="none"', { | |
| 20 # Because we have a patched zlib, we cannot use the system libz. | |
| 21 # TODO(pvalchev): OpenBSD is purposefully left out, as the system | |
| 22 # zlib brings up an incompatibility that breaks rendering. | |
| 23 'use_system_zlib%': 1, | |
| 24 }, { | |
| 25 'use_system_zlib%': 0, | |
| 26 }], | |
| 27 ], | |
| 28 'use_system_minizip%': 0, | |
| 29 }, | |
| 30 'targets': [ | |
| 31 { | |
| 32 'target_name': 'zlib', | |
| 33 'type': 'static_library', | |
| 34 'conditions': [ | |
| 35 ['use_system_zlib==0', { | |
| 36 'sources': [ | |
| 37 '<(zlib_path)/adler32.c', # zlib_path added by Dart. | |
| 38 '<(zlib_path)/compress.c', | |
| 39 '<(zlib_path)/crc32.c', | |
| 40 '<(zlib_path)/crc32.h', | |
| 41 '<(zlib_path)/deflate.c', | |
| 42 '<(zlib_path)/deflate.h', | |
| 43 '<(zlib_path)/gzio.c', | |
| 44 '<(zlib_path)/infback.c', | |
| 45 '<(zlib_path)/inffast.c', | |
| 46 '<(zlib_path)/inffast.h', | |
| 47 '<(zlib_path)/inffixed.h', | |
| 48 '<(zlib_path)/inflate.c', | |
| 49 '<(zlib_path)/inflate.h', | |
| 50 '<(zlib_path)/inftrees.c', | |
| 51 '<(zlib_path)/inftrees.h', | |
| 52 '<(zlib_path)/mozzconf.h', | |
| 53 '<(zlib_path)/trees.c', | |
| 54 '<(zlib_path)/trees.h', | |
| 55 '<(zlib_path)/uncompr.c', | |
| 56 '<(zlib_path)/zconf.h', | |
| 57 '<(zlib_path)/zlib.h', | |
| 58 '<(zlib_path)/zutil.c', | |
| 59 '<(zlib_path)/zutil.h', | |
| 60 ], | |
| 61 'include_dirs': [ | |
| 62 '<(zlib_path)/.', | |
| 63 ], | |
| 64 'direct_dependent_settings': { | |
| 65 'include_dirs': [ | |
| 66 '<(zlib_path)/.', | |
| 67 ], | |
| 68 }, | |
| 69 'conditions': [ | |
| 70 ['OS!="win"', { | |
| 71 'product_name': 'chrome_zlib', | |
| 72 }], ['OS=="android"', { | |
| 73 'toolsets': ['target', 'host'], | |
| 74 }], | |
| 75 ], | |
| 76 }, { | |
| 77 'direct_dependent_settings': { | |
| 78 'defines': [ | |
| 79 'USE_SYSTEM_ZLIB', | |
| 80 ], | |
| 81 }, | |
| 82 'defines': [ | |
| 83 'USE_SYSTEM_ZLIB', | |
| 84 ], | |
| 85 'link_settings': { | |
| 86 'libraries': [ | |
| 87 '-lz', | |
| 88 ], | |
| 89 }, | |
| 90 }], | |
| 91 ], | |
| 92 }, | |
| 93 { | |
| 94 'target_name': 'minizip', | |
| 95 'type': 'static_library', | |
| 96 'conditions': [ | |
| 97 ['use_system_minizip==0', { | |
| 98 'sources': [ | |
| 99 '<(zlib_path)/contrib/minizip/ioapi.c', | |
| 100 '<(zlib_path)/contrib/minizip/ioapi.h', | |
| 101 '<(zlib_path)/contrib/minizip/iowin32.c', | |
| 102 '<(zlib_path)/contrib/minizip/iowin32.h', | |
| 103 '<(zlib_path)/contrib/minizip/unzip.c', | |
| 104 '<(zlib_path)/contrib/minizip/unzip.h', | |
| 105 '<(zlib_path)/contrib/minizip/zip.c', | |
| 106 '<(zlib_path)/contrib/minizip/zip.h', | |
| 107 ], | |
| 108 'include_dirs': [ | |
| 109 '<(zlib_path)/.', | |
| 110 '<(zlib_path)/../..', | |
| 111 ], | |
| 112 'direct_dependent_settings': { | |
| 113 'include_dirs': [ | |
| 114 '<(zlib_path)/.', | |
| 115 ], | |
| 116 }, | |
| 117 'conditions': [ | |
| 118 ['OS!="win"', { | |
| 119 'sources!': [ | |
| 120 '<(zlib_path)/contrib/minizip/iowin32.c' | |
| 121 ], | |
| 122 }], | |
| 123 ['OS=="android"', { | |
| 124 'toolsets': ['target', 'host'], | |
| 125 }], | |
| 126 ], | |
| 127 }, { | |
| 128 'direct_dependent_settings': { | |
| 129 'defines': [ | |
| 130 'USE_SYSTEM_MINIZIP', | |
| 131 ], | |
| 132 }, | |
| 133 'defines': [ | |
| 134 'USE_SYSTEM_MINIZIP', | |
| 135 ], | |
| 136 'link_settings': { | |
| 137 'libraries': [ | |
| 138 '-lminizip', | |
| 139 ], | |
| 140 }, | |
| 141 }], | |
| 142 ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', { | |
| 143 # Mac, Android and the BSDs don't have fopen64, ftello64, or | |
| 144 # fseeko64. We use fopen, ftell, and fseek instead on these | |
| 145 # systems. | |
| 146 'defines': [ | |
| 147 'USE_FILE32API' | |
| 148 ], | |
| 149 }], | |
| 150 ['clang==1', { | |
| 151 'xcode_settings': { | |
| 152 'WARNING_CFLAGS': [ | |
| 153 # zlib uses `if ((a == b))` for some reason. | |
| 154 '-Wno-parentheses-equality', | |
| 155 ], | |
| 156 }, | |
| 157 'cflags': [ | |
| 158 '-Wno-parentheses-equality', | |
| 159 ], | |
| 160 }], | |
| 161 ], | |
| 162 } | |
| 163 ], | |
| 164 } | |
| OLD | NEW |