OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 config("libpng_config") { | 5 config("libpng_config") { |
6 include_dirs = [ | 6 include_dirs = [ "." ] |
7 ".", | |
8 ] | |
9 | 7 |
10 defines = [ | 8 defines = [ |
11 "CHROME_PNG_WRITE_SUPPORT", | 9 "CHROME_PNG_WRITE_SUPPORT", |
12 "PNG_USER_CONFIG", | 10 "PNG_USER_CONFIG", |
13 ] | 11 ] |
14 | 12 |
15 if (is_android) { | 13 if (is_android) { |
16 #'toolsets': ['target', 'host'], | 14 #'toolsets': ['target', 'host'], |
17 defines += [ | 15 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype. |
18 "CHROME_PNG_READ_PACK_SUPPORT", # Required by freetype. | |
19 ] | |
20 } | 16 } |
21 | 17 |
22 if (is_win) { | 18 if (is_win) { |
23 if (component_mode == "shared_library") { | 19 if (component_mode == "shared_library") { |
24 defines += [ | 20 defines += [ |
25 "PNG_USE_DLL", | 21 "PNG_USE_DLL", |
26 "PNG_NO_MODULEDEF", | 22 "PNG_NO_MODULEDEF", |
27 ] | 23 ] |
28 } | 24 } |
29 } | 25 } |
30 } | 26 } |
31 | 27 |
32 source_set("libpng_sources") { | 28 source_set("libpng_sources") { |
33 sources = [ | 29 sources = [ |
34 "png.c", | 30 "png.c", |
35 "png.h", | 31 "png.h", |
36 "pngconf.h", | 32 "pngconf.h", |
37 "pngerror.c", | 33 "pngerror.c", |
38 "pnggccrd.c", | 34 "pnggccrd.c", |
39 "pngget.c", | 35 "pngget.c", |
40 "pngmem.c", | 36 "pngmem.c", |
41 "pngpread.c", | 37 "pngpread.c", |
42 "pngread.c", | 38 "pngread.c", |
43 "pngrio.c", | 39 "pngrio.c", |
(...skipping 15 matching lines...) Expand all Loading... |
59 if (is_win) { | 55 if (is_win) { |
60 cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187 | 56 cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187 |
61 | 57 |
62 if (component_mode == "shared_library") { | 58 if (component_mode == "shared_library") { |
63 defines = [ "PNG_BUILD_DLL" ] | 59 defines = [ "PNG_BUILD_DLL" ] |
64 } | 60 } |
65 } | 61 } |
66 | 62 |
67 public_configs = [ ":libpng_config" ] | 63 public_configs = [ ":libpng_config" ] |
68 | 64 |
69 public_deps = [ "//third_party/zlib" ] | 65 public_deps = [ |
| 66 "//third_party/zlib", |
| 67 ] |
70 } | 68 } |
71 | 69 |
72 if (is_win) { | 70 if (is_win) { |
73 component("libpng") { | 71 component("libpng") { |
74 public_deps = [ ":libpng_sources" ] | 72 public_deps = [ |
| 73 ":libpng_sources", |
| 74 ] |
75 } | 75 } |
76 } else { | 76 } else { |
77 group("libpng") { | 77 group("libpng") { |
78 public_deps = [ ":libpng_sources" ] | 78 public_deps = [ |
| 79 ":libpng_sources", |
| 80 ] |
79 } | 81 } |
80 } | 82 } |
OLD | NEW |