Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: third_party/libpng/BUILD.gn

Issue 589753005: gn: Fix build issues blocking gfx from being built (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libpng/BUILD.gn
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index f920c0ba3cb8e88d79c7055104941836332eac75..fdfd5a6a79b6d30291d617289fc8638217dc2902 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,6 +58,10 @@ static_library("libpng") {
if (is_win) {
cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187
+
+ if (component_mode == "shared_library") {
+ defines = [ "PNG_BUILD_DLL" ]
+ }
}
forward_dependent_configs_from = [ "//third_party/zlib" ]
@@ -68,3 +72,17 @@ static_library("libpng") {
"//third_party/zlib",
]
}
+
+if (is_win) {
+ component("libpng") {
+ deps = [ ":libpng_sources" ]
+
+ forward_dependent_configs_from = [ ":libpng_sources" ]
brettw 2014/09/21 02:55:00 I'm trying to get rid of this. Replace "deps" with
ckocagil 2014/09/21 11:47:26 Done.
+ }
+} else {
+ static_library("libpng") {
+ deps = [ ":libpng_sources" ]
+
+ forward_dependent_configs_from = [ ":libpng_sources" ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698