OLD | NEW |
1 # Copyright 2014 Google Inc. | 1 # Copyright 2014 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 { | 6 { |
7 'variables': { | |
8 'skia_warnings_as_errors': 0, | |
9 }, | |
10 'targets': [ | 7 'targets': [ |
11 { | 8 { |
| 9 # Only used by win, down below. |
12 'target_name' : 'zlib_x86_simd', | 10 'target_name' : 'zlib_x86_simd', |
13 'type': 'static_library', | 11 'type': 'static_library', |
14 'cflags' : ['-msse4.2', '-mpclmul'], | 12 'cflags' : ['-msse4.2', '-mpclmul'], |
15 'xcode_settings': { | |
16 'OTHER_CFLAGS': ['-msse4.2', '-mpclmul'], | |
17 }, | |
18 'sources' : [ | 13 'sources' : [ |
19 '../third_party/externals/zlib/x86.h', | |
20 '../third_party/externals/zlib/x86.c', | |
21 '../third_party/externals/zlib/crc_folding.c', | 14 '../third_party/externals/zlib/crc_folding.c', |
22 '../third_party/externals/zlib/fill_window_sse.c', | 15 '../third_party/externals/zlib/fill_window_sse.c', |
23 ], | 16 ], |
24 'conditions': [ | 17 'conditions': [ |
25 ['skia_clang_build==1', { | 18 ['skia_clang_build==1', { |
26 'msvs_settings': { | 19 'msvs_settings': { |
27 'VCCLCompilerTool': { | 20 'VCCLCompilerTool': { |
28 'AdditionalOptions': [ '-msse4.2', '-mpclmul' ], | 21 'AdditionalOptions': [ '-msse4.2', '-mpclmul' ], |
| 22 }, |
29 }, | 23 }, |
30 }, | 24 }], |
31 }], | 25 ], |
32 ['skia_os in ["linux", "chromeos"]', { | |
33 'all_dependent_settings': { | |
34 'libraries': [ '-lpthread' ], | |
35 }, | |
36 }], | |
37 ], | |
38 }, | 26 }, |
39 { | 27 { |
40 'target_name': 'zlib', | 28 'target_name': 'zlib', |
| 29 'direct_dependent_settings': { |
| 30 'conditions': [ |
| 31 [ 'skia_android_framework', { 'include_dirs': [ 'external/zlib' ] }], |
| 32 [ 'skia_os == "mac" or skia_os == "ios"', { |
| 33 # XCode needs and explicit file path, not a logical name like -lz. |
| 34 'link_settings': { 'libraries': [ '$(SDKROOT)/usr/lib/libz.dylib'
] }, |
| 35 }], |
| 36 [ 'skia_os not in ["mac", "ios", "win"]',{ |
| 37 'link_settings': { 'libraries': [ '-lz' ] }, |
| 38 }] |
| 39 ], |
| 40 }, |
41 'conditions': [ | 41 'conditions': [ |
42 [ 'skia_android_framework', { | 42 [ 'skia_os != "win"', { |
43 'type': 'none', | 43 'type': 'none', |
44 'direct_dependent-settings': { | 44 }, { |
45 'include_dirs': [ 'external/zlib' ] | 45 # win |
46 }, | |
47 },{ | |
48 'type': 'static_library', | 46 'type': 'static_library', |
49 'sources': [ | 47 'sources': [ |
50 '../third_party/externals/zlib/adler32.c', | 48 '../third_party/externals/zlib/adler32.c', |
51 '../third_party/externals/zlib/compress.c', | 49 '../third_party/externals/zlib/compress.c', |
52 '../third_party/externals/zlib/crc32.c', | 50 '../third_party/externals/zlib/crc32.c', |
53 '../third_party/externals/zlib/crc32.h', | 51 '../third_party/externals/zlib/crc32.h', |
54 '../third_party/externals/zlib/deflate.c', | 52 '../third_party/externals/zlib/deflate.c', |
55 '../third_party/externals/zlib/deflate.h', | 53 '../third_party/externals/zlib/deflate.h', |
56 '../third_party/externals/zlib/gzclose.c', | 54 '../third_party/externals/zlib/gzclose.c', |
57 '../third_party/externals/zlib/gzguts.h', | 55 '../third_party/externals/zlib/gzguts.h', |
58 '../third_party/externals/zlib/gzlib.c', | 56 '../third_party/externals/zlib/gzlib.c', |
59 '../third_party/externals/zlib/gzread.c', | 57 '../third_party/externals/zlib/gzread.c', |
60 '../third_party/externals/zlib/gzwrite.c', | 58 '../third_party/externals/zlib/gzwrite.c', |
61 '../third_party/externals/zlib/infback.c', | 59 '../third_party/externals/zlib/infback.c', |
62 '../third_party/externals/zlib/inffast.c', | 60 '../third_party/externals/zlib/inffast.c', |
63 '../third_party/externals/zlib/inffast.h', | 61 '../third_party/externals/zlib/inffast.h', |
64 '../third_party/externals/zlib/inffixed.h', | 62 '../third_party/externals/zlib/inffixed.h', |
65 '../third_party/externals/zlib/inflate.c', | 63 '../third_party/externals/zlib/inflate.c', |
66 '../third_party/externals/zlib/inflate.h', | 64 '../third_party/externals/zlib/inflate.h', |
67 '../third_party/externals/zlib/inftrees.c', | 65 '../third_party/externals/zlib/inftrees.c', |
68 '../third_party/externals/zlib/inftrees.h', | 66 '../third_party/externals/zlib/inftrees.h', |
69 '../third_party/externals/zlib/mozzconf.h', | 67 '../third_party/externals/zlib/mozzconf.h', |
70 '../third_party/externals/zlib/trees.c', | 68 '../third_party/externals/zlib/trees.c', |
71 '../third_party/externals/zlib/trees.h', | 69 '../third_party/externals/zlib/trees.h', |
72 '../third_party/externals/zlib/uncompr.c', | 70 '../third_party/externals/zlib/uncompr.c', |
| 71 '../third_party/externals/zlib/x86.h', |
| 72 '../third_party/externals/zlib/x86.c', |
73 '../third_party/externals/zlib/zconf.h', | 73 '../third_party/externals/zlib/zconf.h', |
74 '../third_party/externals/zlib/zlib.h', | 74 '../third_party/externals/zlib/zlib.h', |
75 '../third_party/externals/zlib/zutil.c', | 75 '../third_party/externals/zlib/zutil.c', |
76 '../third_party/externals/zlib/zutil.h', | 76 '../third_party/externals/zlib/zutil.h', |
77 ], | 77 ], |
78 'include_dirs': [ | 78 'include_dirs': [ |
79 '../third_party/externals/zlib/', | 79 '../third_party/externals/zlib/', |
80 ], | 80 ], |
81 'direct_dependent_settings': { | 81 'direct_dependent_settings': { |
82 'include_dirs': [ | 82 'include_dirs': [ |
83 '../third_party/externals/zlib', | 83 '../third_party/externals/zlib', |
84 ], | 84 ], |
85 }, | 85 }, |
86 'conditions': [ | 86 'dependencies': [ |
87 [ '"x86" in skia_arch_type', { | 87 'zlib_x86_simd', |
88 'dependencies': [ 'zlib_x86_simd' ], | |
89 },{ | |
90 'sources': ['../third_party/externals/zlib/simd_stub.c'], | |
91 }] | |
92 ], | 88 ], |
93 'defines': [ | 89 'defines': [ |
94 '_CRT_NONSTDC_NO_DEPRECATE', | 90 '_CRT_NONSTDC_NO_DEPRECATE', |
95 ], | 91 ], |
96 }], | 92 }], |
97 ], | 93 ], |
98 }], | 94 }], |
99 } | 95 } |
OLD | NEW |