1 # Copyright (c) 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.
5 config("zlib_config") {
9 static_library("zlib_x86_simd") {
10 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
15 if (!is_win || is_clang) {
27 configs -= [ "//build/config/compiler:chromium_code" ]
28 configs += [ "//build/config/compiler:no_chromium_code" ]
31 static_library("zlib") {
33 # Don't stomp on "libzlib" on other platforms.
34 output_name = "chrome_zlib"
68 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
69 sources += [ "x86.c" ]
71 config("zlib_warnings") {
73 cflags = [ "-Wno-incompatible-pointer-types" ]
76 configs += [ ":zlib_warnings" ]
79 configs -= [ "//build/config/compiler:chromium_code" ]
80 configs += [ "//build/config/compiler:no_chromium_code" ]
82 public_configs = [ ":zlib_config" ]
88 static_library("minizip") {
90 "contrib/minizip/ioapi.c",
91 "contrib/minizip/ioapi.h",
92 "contrib/minizip/iowin32.c",
93 "contrib/minizip/iowin32.h",
94 "contrib/minizip/unzip.c",
95 "contrib/minizip/unzip.h",
96 "contrib/minizip/zip.c",
97 "contrib/minizip/zip.h",
102 "contrib/minizip/iowin32.c",
103 "contrib/minizip/iowin32.h",
106 if (is_mac || is_ios || is_android) {
107 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
108 # use fopen, ftell, and fseek instead on these systems.
109 defines = [ "USE_FILE32API" ]
116 config("minizip_warnings") {
118 # zlib uses `if ((a == b))` for some reason.
119 cflags = [ "-Wno-parentheses-equality" ]
123 configs -= [ "//build/config/compiler:chromium_code" ]
124 configs += [ "//build/config/compiler:no_chromium_code" ]
125 configs += [ ":minizip_warnings" ]
126 public_configs = [ ":zlib_config" ]
129 static_library("zip") {
133 "google/zip_internal.cc",
134 "google/zip_internal.h",
135 "google/zip_reader.cc",
136 "google/zip_reader.h",