| Index: third_party/libpng/BUILD.gn
|
| diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
|
| index f920c0ba3cb8e88d79c7055104941836332eac75..0d2eeb4c962a867b92ec393d0f4262d2760a54ef 100644
|
| --- a/third_party/libpng/BUILD.gn
|
| +++ b/third_party/libpng/BUILD.gn
|
| @@ -29,7 +29,7 @@ config("libpng_config") {
|
| }
|
| }
|
|
|
| -static_library("libpng") {
|
| +source_set("libpng_sources") {
|
| sources = [
|
| "png.c",
|
| "png.h",
|
| @@ -58,13 +58,23 @@ static_library("libpng") {
|
|
|
| if (is_win) {
|
| cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187
|
| - }
|
|
|
| - forward_dependent_configs_from = [ "//third_party/zlib" ]
|
| + if (component_mode == "shared_library") {
|
| + defines = [ "PNG_BUILD_DLL" ]
|
| + }
|
| + }
|
|
|
| direct_dependent_configs = [ ":libpng_config" ]
|
|
|
| - deps = [
|
| - "//third_party/zlib",
|
| - ]
|
| + public_deps = [ "//third_party/zlib" ]
|
| +}
|
| +
|
| +if (is_win) {
|
| + component("libpng") {
|
| + public_deps = [ ":libpng_sources" ]
|
| + }
|
| +} else {
|
| + static_library("libpng") {
|
| + public_deps = [ ":libpng_sources" ]
|
| + }
|
| }
|
|
|