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

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: reverted target.cc change 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
« no previous file with comments | « skia/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" ]
+ }
}
« no previous file with comments | « skia/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698