aboutsummaryrefslogtreecommitdiff
path: root/third_party/zlib/BUILD.gn
blob: 457fc9a894817f7c4d19f7433196605f1635a93b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config("zlib_config") {
  include_dirs = [ "src" ]
}

config("zlib_internal_config") {
  defines = [ "ZLIB_IMPLEMENTATION" ]
  cflags = [ "-w" ]  # Disable all warnings.
}

static_library("zlib") {
  # Don't stomp on "libzlib"
  output_name = "chrome_zlib"

  sources = [
    "src/adler32.c",
    "src/compress.c",
    "src/crc32.c",
    "src/crc32.h",
    "src/deflate.c",
    "src/deflate.h",
    "src/gzclose.c",
    "src/gzguts.h",
    "src/gzlib.c",
    "src/gzread.c",
    "src/gzwrite.c",
    "src/infback.c",
    "src/inffast.c",
    "src/inffast.h",
    "src/inffixed.h",
    "src/inflate.c",
    "src/inflate.h",
    "src/inftrees.c",
    "src/inftrees.h",
    "src/trees.c",
    "src/trees.h",
    "src/uncompr.c",
    "src/zconf.h",
    "src/zlib.h",
    "src/zutil.c",
    "src/zutil.h",
  ]

  defines = []
  deps = []

  include_dirs = [ "." ]
  configs += [ ":zlib_internal_config" ]

  public_configs = [ ":zlib_config" ]

  allow_circular_includes_from = deps
}