abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1 | # Copyright 2016 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 | |
mtklein | f037d48 | 2016-07-19 08:25:00 -0700 | [diff] [blame] | 6 | declare_args() { |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 7 | skia_use_system_zlib = is_official_build |
mtklein | f037d48 | 2016-07-19 08:25:00 -0700 | [diff] [blame] | 8 | } |
| 9 | |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 10 | import("../third_party.gni") |
| 11 | |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 12 | if (skia_use_system_zlib) { |
| 13 | system("zlib") { |
| 14 | libs = [ "z" ] |
| 15 | } |
| 16 | } else { |
| 17 | third_party("zlib") { |
| 18 | public_include_dirs = [ "../externals/zlib" ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 19 | |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 20 | sources = [ |
| 21 | "../externals/zlib/adler32.c", |
| 22 | "../externals/zlib/compress.c", |
| 23 | "../externals/zlib/crc32.c", |
| 24 | "../externals/zlib/deflate.c", |
| 25 | "../externals/zlib/gzclose.c", |
| 26 | "../externals/zlib/gzlib.c", |
| 27 | "../externals/zlib/gzread.c", |
| 28 | "../externals/zlib/gzwrite.c", |
| 29 | "../externals/zlib/infback.c", |
| 30 | "../externals/zlib/inffast.c", |
| 31 | "../externals/zlib/inflate.c", |
| 32 | "../externals/zlib/inftrees.c", |
| 33 | "../externals/zlib/simd_stub.c", |
| 34 | "../externals/zlib/trees.c", |
| 35 | "../externals/zlib/uncompr.c", |
| 36 | "../externals/zlib/zutil.c", |
| 37 | ] |
| 38 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 39 | } |