blob: 93affea5401b0cb059ab47d123c012a2cd19ed8d [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{
bsalomonebc1c102015-08-06 17:33:16 -07007 'variables': {
8 'skia_warnings_as_errors': 0,
9 },
scroggo3da91812015-03-02 06:24:15 -080010 'targets': [
11 {
mtklein82966b52015-03-07 07:47:51 -080012 # Only used by win, down below.
scroggo3da91812015-03-02 06:24:15 -080013 'target_name' : 'zlib_x86_simd',
14 'type': 'static_library',
15 'cflags' : ['-msse4.2', '-mpclmul'],
16 'sources' : [
17 '../third_party/externals/zlib/crc_folding.c',
18 '../third_party/externals/zlib/fill_window_sse.c',
19 ],
mtklein82966b52015-03-07 07:47:51 -080020 'conditions': [
21 ['skia_clang_build==1', {
22 'msvs_settings': {
23 'VCCLCompilerTool': {
24 'AdditionalOptions': [ '-msse4.2', '-mpclmul' ],
25 },
scroggo3da91812015-03-02 06:24:15 -080026 },
mtklein82966b52015-03-07 07:47:51 -080027 }],
28 ],
scroggo3da91812015-03-02 06:24:15 -080029 },
30 {
31 'target_name': 'zlib',
mtklein82966b52015-03-07 07:47:51 -080032 'direct_dependent_settings': {
33 'conditions': [
34 [ 'skia_android_framework', { 'include_dirs': [ 'external/zlib' ] }],
35 [ 'skia_os == "mac" or skia_os == "ios"', {
mtklein24d82492015-07-13 08:13:03 -070036 # XCode needs a full library name, not -lz.
37 'link_settings': { 'libraries': [ 'libz.dylib' ] },
mtklein82966b52015-03-07 07:47:51 -080038 }],
39 [ 'skia_os not in ["mac", "ios", "win"]',{
40 'link_settings': { 'libraries': [ '-lz' ] },
41 }]
42 ],
43 },
scroggo3da91812015-03-02 06:24:15 -080044 'conditions': [
mtklein82966b52015-03-07 07:47:51 -080045 [ 'skia_os != "win"', {
46 'type': 'none',
47 }, {
48 # win
scroggo3da91812015-03-02 06:24:15 -080049 'type': 'static_library',
50 'sources': [
51 '../third_party/externals/zlib/adler32.c',
52 '../third_party/externals/zlib/compress.c',
53 '../third_party/externals/zlib/crc32.c',
54 '../third_party/externals/zlib/crc32.h',
55 '../third_party/externals/zlib/deflate.c',
56 '../third_party/externals/zlib/deflate.h',
57 '../third_party/externals/zlib/gzclose.c',
58 '../third_party/externals/zlib/gzguts.h',
59 '../third_party/externals/zlib/gzlib.c',
60 '../third_party/externals/zlib/gzread.c',
61 '../third_party/externals/zlib/gzwrite.c',
62 '../third_party/externals/zlib/infback.c',
63 '../third_party/externals/zlib/inffast.c',
64 '../third_party/externals/zlib/inffast.h',
65 '../third_party/externals/zlib/inffixed.h',
66 '../third_party/externals/zlib/inflate.c',
67 '../third_party/externals/zlib/inflate.h',
68 '../third_party/externals/zlib/inftrees.c',
69 '../third_party/externals/zlib/inftrees.h',
70 '../third_party/externals/zlib/mozzconf.h',
71 '../third_party/externals/zlib/trees.c',
72 '../third_party/externals/zlib/trees.h',
73 '../third_party/externals/zlib/uncompr.c',
mtklein82966b52015-03-07 07:47:51 -080074 '../third_party/externals/zlib/x86.h',
75 '../third_party/externals/zlib/x86.c',
scroggo3da91812015-03-02 06:24:15 -080076 '../third_party/externals/zlib/zconf.h',
77 '../third_party/externals/zlib/zlib.h',
78 '../third_party/externals/zlib/zutil.c',
79 '../third_party/externals/zlib/zutil.h',
80 ],
81 'include_dirs': [
82 '../third_party/externals/zlib/',
83 ],
84 'direct_dependent_settings': {
85 'include_dirs': [
86 '../third_party/externals/zlib',
87 ],
88 },
mtklein82966b52015-03-07 07:47:51 -080089 'dependencies': [
90 'zlib_x86_simd',
scroggo3da91812015-03-02 06:24:15 -080091 ],
92 'defines': [
93 '_CRT_NONSTDC_NO_DEPRECATE',
94 ],
95 }],
96 ],
mtklein1e4e8142015-02-17 13:10:43 -080097 }],
vandebo@chromium.org0f1c95c2011-06-24 23:13:47 +000098}