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 config("zlib_warnings") {
32 if (is_clang && !is_ios &&
33 (current_cpu == "x86" || current_cpu == "x64")) {
34 cflags = [ "-Wno-incompatible-pointer-types" ]
38 static_library("zlib") {
40 # Don't stomp on "libzlib" on other platforms.
41 output_name = "chrome_zlib"
75 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
76 sources += [ "x86.c" ]
79 configs -= [ "//build/config/compiler:chromium_code" ]
81 "//build/config/compiler:no_chromium_code",
83 # Must be after no_chromium_code for warning flags to be ordered correctly.
87 public_configs = [ ":zlib_config" ]
93 config("minizip_warnings") {
96 # zlib uses `if ((a == b))` for some reason.
97 cflags = [ "-Wno-parentheses-equality" ]
101 static_library("minizip") {
103 "contrib/minizip/ioapi.c",
104 "contrib/minizip/ioapi.h",
105 "contrib/minizip/iowin32.c",
106 "contrib/minizip/iowin32.h",
107 "contrib/minizip/unzip.c",
108 "contrib/minizip/unzip.h",
109 "contrib/minizip/zip.c",
110 "contrib/minizip/zip.h",
115 "contrib/minizip/iowin32.c",
116 "contrib/minizip/iowin32.h",
119 if (is_mac || is_ios || is_android) {
120 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
121 # use fopen, ftell, and fseek instead on these systems.
122 defines = [ "USE_FILE32API" ]
129 configs -= [ "//build/config/compiler:chromium_code" ]
131 "//build/config/compiler:no_chromium_code",
133 # Must be after no_chromium_code for warning flags to be ordered correctly.
136 public_configs = [ ":zlib_config" ]
139 static_library("zip") {
143 "google/zip_internal.cc",
144 "google/zip_internal.h",
145 "google/zip_reader.cc",
146 "google/zip_reader.h",