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 | 7 |
8 defines = [ | 8 defines = [ |
9 "CHROME_PNG_WRITE_SUPPORT", | 9 "CHROME_PNG_WRITE_SUPPORT", |
10 "PNG_USER_CONFIG", | 10 "PNG_USER_CONFIG", |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 "pngvcrd.c", | 45 "pngvcrd.c", |
46 "pngwio.c", | 46 "pngwio.c", |
47 "pngwrite.c", | 47 "pngwrite.c", |
48 "pngwtran.c", | 48 "pngwtran.c", |
49 "pngwutil.c", | 49 "pngwutil.c", |
50 ] | 50 ] |
51 | 51 |
52 configs -= [ "//build/config/compiler:chromium_code" ] | 52 configs -= [ "//build/config/compiler:chromium_code" ] |
53 configs += [ "//build/config/compiler:no_chromium_code" ] | 53 configs += [ "//build/config/compiler:no_chromium_code" ] |
54 | 54 |
55 if (is_win && is_component_build) { | 55 if (is_win) { |
56 defines = [ "PNG_BUILD_DLL" ] | 56 cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187 |
| 57 |
| 58 if (component_mode == "shared_library") { |
| 59 defines = [ "PNG_BUILD_DLL" ] |
| 60 } |
57 } | 61 } |
58 | 62 |
59 public_configs = [ ":libpng_config" ] | 63 public_configs = [ ":libpng_config" ] |
60 | 64 |
61 public_deps = [ | 65 public_deps = [ |
62 "//third_party/zlib", | 66 "//third_party/zlib", |
63 ] | 67 ] |
64 } | 68 } |
65 | 69 |
66 if (is_win) { | 70 if (is_win) { |
67 component("libpng") { | 71 component("libpng") { |
68 public_deps = [ | 72 public_deps = [ |
69 ":libpng_sources", | 73 ":libpng_sources", |
70 ] | 74 ] |
71 } | 75 } |
72 } else { | 76 } else { |
73 group("libpng") { | 77 group("libpng") { |
74 public_deps = [ | 78 public_deps = [ |
75 ":libpng_sources", | 79 ":libpng_sources", |
76 ] | 80 ] |
77 } | 81 } |
78 } | 82 } |
OLD | NEW |