xref: /aosp_15_r20/external/zlib/google/BUILD.gn (revision 86ee64e75fa5f8bce2c8c356138035642429cd05)
1# Copyright 2017 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build_overrides/build.gni")
6
7if (build_with_chromium && is_ios) {
8  import("//build/config/ios/bundle_data_from_filelist.gni")
9}
10
11if (build_with_chromium) {
12  static_library("zip") {
13    sources = [
14      "redact.h",
15      "zip.cc",
16      "zip.h",
17      "zip_internal.cc",
18      "zip_internal.h",
19      "zip_reader.cc",
20      "zip_reader.h",
21      "zip_writer.cc",
22      "zip_writer.h",
23    ]
24    deps = [
25      "..:minizip",
26      "//base",
27      "//base:i18n",
28    ]
29  }
30
31  static_library("compression_utils") {
32    sources = [
33      "compression_utils.cc",
34      "compression_utils.h",
35    ]
36    deps = [
37      "..",
38      "//base",
39    ]
40    public_deps = [ ":compression_utils_portable" ]
41  }
42
43  if (is_ios) {
44    bundle_data_from_filelist("zlib_pak_bundle_data") {
45      testonly = true
46      filelist_name = "test_data.filelist"
47    }
48  }
49}
50
51# This allows other users of Chromium's zlib library, but don't use Chromium's
52# //base, to reuse some boilerplate code.
53static_library("compression_utils_portable") {
54  sources = [
55    "compression_utils_portable.cc",
56    "compression_utils_portable.h",
57  ]
58  public_deps = [ ".." ]
59}
60