blob: 78adc34b72486f9ac41381bd776c681f77b91c05 [file] [log] [blame]
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +00001# Copyright 2014 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +00006{
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +00007 'variables': {
8 'skia_warnings_as_errors': 0,
9 },
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000010 'targets': [
11 {
12 'target_name': 'zlib',
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000013 'conditions': [
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000014 [ 'skia_zlib_static',
15 {
16 'type': 'static_library',
17 'include_dirs': [
18 '../third_party/externals/zlib',
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000019 ],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000020 'direct_dependent_settings': {
21 'defines': [
commit-bot@chromium.org076ce352014-02-25 18:01:37 +000022 'SK_ZLIB_INCLUDE="zlib.h"',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000023 ],
24 'include_dirs': [
25 '../third_party/externals/zlib',
26 ],
27 },
28 'sources': [
29 '../third_party/externals/zlib/src/adler32.c',
30 '../third_party/externals/zlib/src/compress.c',
31 '../third_party/externals/zlib/src/crc32.c',
32 '../third_party/externals/zlib/src/deflate.c',
33 '../third_party/externals/zlib/src/gzclose.c',
34 '../third_party/externals/zlib/src/gzlib.c',
35 '../third_party/externals/zlib/src/gzread.c',
36 '../third_party/externals/zlib/src/gzwrite.c',
37 '../third_party/externals/zlib/src/infback.c',
38 '../third_party/externals/zlib/src/inffast.c',
39 '../third_party/externals/zlib/src/inflate.c',
40 '../third_party/externals/zlib/src/inftrees.c',
41 '../third_party/externals/zlib/src/trees.c',
42 '../third_party/externals/zlib/src/uncompr.c',
43 '../third_party/externals/zlib/src/zutil.c',
caryclark@google.com594dd3c2012-09-24 19:33:57 +000044 ],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000045 }, { # not skia_zlib_static
46 'type': 'none',
47 'direct_dependent_settings': {
48 'conditions': [
49 [ 'skia_android_framework', {
50 'include_dirs': [
51 'external/zlib',
52 ],
53 }, {
54 'defines': [
commit-bot@chromium.org076ce352014-02-25 18:01:37 +000055 'SK_SYSTEM_ZLIB=1',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000056 ],
57 }]
58 ],
59 'link_settings': {
60 'conditions': [
61 [ 'skia_os == "mac" or skia_os == "ios"', {
62 'libraries': [
63 '$(SDKROOT)/usr/lib/libz.dylib',
64 ]
65 }, { # skia_os != "mac" and skia_os != "ios"
66 'libraries': [
67 '-lz',
68 ]
69 }],
70 ],
71 }
72 },
73 }
74 ]
75 ]
76 }
77 ]
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000078}