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" ]
72 configs -= [ "//build/config/compiler:chromium_code" ]
73 configs += [ "//build/config/compiler:no_chromium_code" ]
75 public_configs = [ ":zlib_config" ]
81 static_library("minizip") {
83 "contrib/minizip/ioapi.c",
84 "contrib/minizip/ioapi.h",
85 "contrib/minizip/iowin32.c",
86 "contrib/minizip/iowin32.h",
87 "contrib/minizip/unzip.c",
88 "contrib/minizip/unzip.h",
89 "contrib/minizip/zip.c",
90 "contrib/minizip/zip.h",
95 "contrib/minizip/iowin32.c",
96 "contrib/minizip/iowin32.h",
99 if (is_mac || is_ios || is_android) {
100 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
101 # use fopen, ftell, and fseek instead on these systems.
102 defines = [ "USE_FILE32API" ]
109 config("minizip_warnings") {
111 # zlib uses `if ((a == b))` for some reason.
112 cflags = [ "-Wno-parentheses-equality" ]
116 configs -= [ "//build/config/compiler:chromium_code" ]
117 configs += [ "//build/config/compiler:no_chromium_code" ]
118 configs += [ ":minizip_warnings" ]
119 public_configs = [ ":zlib_config" ]
122 static_library("zip") {
126 "google/zip_internal.cc",
127 "google/zip_internal.h",
128 "google/zip_reader.cc",
129 "google/zip_reader.h",