blob: 1a79715f9eb2563a2efd3983f5b1a48e0ebbb7be [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{
scroggo3da91812015-03-02 06:24:15 -08007 'targets': [
8 {
mtklein82966b52015-03-07 07:47:51 -08009 # Only used by win, down below.
scroggo3da91812015-03-02 06:24:15 -080010 'target_name' : 'zlib_x86_simd',
11 'type': 'static_library',
12 'cflags' : ['-msse4.2', '-mpclmul'],
13 'sources' : [
14 '../third_party/externals/zlib/crc_folding.c',
15 '../third_party/externals/zlib/fill_window_sse.c',
16 ],
mtklein82966b52015-03-07 07:47:51 -080017 'conditions': [
18 ['skia_clang_build==1', {
19 'msvs_settings': {
20 'VCCLCompilerTool': {
21 'AdditionalOptions': [ '-msse4.2', '-mpclmul' ],
22 },
scroggo3da91812015-03-02 06:24:15 -080023 },
mtklein82966b52015-03-07 07:47:51 -080024 }],
25 ],
scroggo3da91812015-03-02 06:24:15 -080026 },
27 {
28 'target_name': 'zlib',
mtklein82966b52015-03-07 07:47:51 -080029 'direct_dependent_settings': {
30 'conditions': [
31 [ 'skia_android_framework', { 'include_dirs': [ 'external/zlib' ] }],
32 [ 'skia_os == "mac" or skia_os == "ios"', {
mtklein24d82492015-07-13 08:13:03 -070033 # XCode needs a full library name, not -lz.
34 'link_settings': { 'libraries': [ 'libz.dylib' ] },
mtklein82966b52015-03-07 07:47:51 -080035 }],
36 [ 'skia_os not in ["mac", "ios", "win"]',{
37 'link_settings': { 'libraries': [ '-lz' ] },
38 }]
39 ],
40 },
scroggo3da91812015-03-02 06:24:15 -080041 'conditions': [
mtklein82966b52015-03-07 07:47:51 -080042 [ 'skia_os != "win"', {
43 'type': 'none',
44 }, {
45 # win
scroggo3da91812015-03-02 06:24:15 -080046 'type': 'static_library',
47 'sources': [
48 '../third_party/externals/zlib/adler32.c',
49 '../third_party/externals/zlib/compress.c',
50 '../third_party/externals/zlib/crc32.c',
51 '../third_party/externals/zlib/crc32.h',
52 '../third_party/externals/zlib/deflate.c',
53 '../third_party/externals/zlib/deflate.h',
54 '../third_party/externals/zlib/gzclose.c',
55 '../third_party/externals/zlib/gzguts.h',
56 '../third_party/externals/zlib/gzlib.c',
57 '../third_party/externals/zlib/gzread.c',
58 '../third_party/externals/zlib/gzwrite.c',
59 '../third_party/externals/zlib/infback.c',
60 '../third_party/externals/zlib/inffast.c',
61 '../third_party/externals/zlib/inffast.h',
62 '../third_party/externals/zlib/inffixed.h',
63 '../third_party/externals/zlib/inflate.c',
64 '../third_party/externals/zlib/inflate.h',
65 '../third_party/externals/zlib/inftrees.c',
66 '../third_party/externals/zlib/inftrees.h',
67 '../third_party/externals/zlib/mozzconf.h',
68 '../third_party/externals/zlib/trees.c',
69 '../third_party/externals/zlib/trees.h',
70 '../third_party/externals/zlib/uncompr.c',
mtklein82966b52015-03-07 07:47:51 -080071 '../third_party/externals/zlib/x86.h',
72 '../third_party/externals/zlib/x86.c',
scroggo3da91812015-03-02 06:24:15 -080073 '../third_party/externals/zlib/zconf.h',
74 '../third_party/externals/zlib/zlib.h',
75 '../third_party/externals/zlib/zutil.c',
76 '../third_party/externals/zlib/zutil.h',
77 ],
78 'include_dirs': [
79 '../third_party/externals/zlib/',
80 ],
81 'direct_dependent_settings': {
82 'include_dirs': [
83 '../third_party/externals/zlib',
84 ],
85 },
mtklein82966b52015-03-07 07:47:51 -080086 'dependencies': [
87 'zlib_x86_simd',
scroggo3da91812015-03-02 06:24:15 -080088 ],
89 'defines': [
90 '_CRT_NONSTDC_NO_DEPRECATE',
91 ],
92 }],
93 ],
mtklein1e4e8142015-02-17 13:10:43 -080094 }],
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000095}