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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « skia/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ] 8 ]
9 9
10 defines = [ 10 defines = [
(...skipping 11 matching lines...) Expand all
22 if (is_win) { 22 if (is_win) {
23 if (component_mode == "shared_library") { 23 if (component_mode == "shared_library") {
24 defines += [ 24 defines += [
25 "PNG_USE_DLL", 25 "PNG_USE_DLL",
26 "PNG_NO_MODULEDEF", 26 "PNG_NO_MODULEDEF",
27 ] 27 ]
28 } 28 }
29 } 29 }
30 } 30 }
31 31
32 static_library("libpng") { 32 source_set("libpng_sources") {
33 sources = [ 33 sources = [
34 "png.c", 34 "png.c",
35 "png.h", 35 "png.h",
36 "pngconf.h", 36 "pngconf.h",
37 "pngerror.c", 37 "pngerror.c",
38 "pnggccrd.c", 38 "pnggccrd.c",
39 "pngget.c", 39 "pngget.c",
40 "pngmem.c", 40 "pngmem.c",
41 "pngpread.c", 41 "pngpread.c",
42 "pngread.c", 42 "pngread.c",
43 "pngrio.c", 43 "pngrio.c",
44 "pngrtran.c", 44 "pngrtran.c",
45 "pngrutil.c", 45 "pngrutil.c",
46 "pngset.c", 46 "pngset.c",
47 "pngtrans.c", 47 "pngtrans.c",
48 "pngusr.h", 48 "pngusr.h",
49 "pngvcrd.c", 49 "pngvcrd.c",
50 "pngwio.c", 50 "pngwio.c",
51 "pngwrite.c", 51 "pngwrite.c",
52 "pngwtran.c", 52 "pngwtran.c",
53 "pngwutil.c", 53 "pngwutil.c",
54 ] 54 ]
55 55
56 configs -= [ "//build/config/compiler:chromium_code" ] 56 configs -= [ "//build/config/compiler:chromium_code" ]
57 configs += [ "//build/config/compiler:no_chromium_code" ] 57 configs += [ "//build/config/compiler:no_chromium_code" ]
58 58
59 if (is_win) { 59 if (is_win) {
60 cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187 60 cflags = [ "/wd4267" ] # TODO(jschuh): http://crbug.com/167187
61
62 if (component_mode == "shared_library") {
63 defines = [ "PNG_BUILD_DLL" ]
64 }
61 } 65 }
62 66
63 forward_dependent_configs_from = [ "//third_party/zlib" ]
64
65 direct_dependent_configs = [ ":libpng_config" ] 67 direct_dependent_configs = [ ":libpng_config" ]
66 68
67 deps = [ 69 public_deps = [ "//third_party/zlib" ]
68 "//third_party/zlib",
69 ]
70 } 70 }
71
72 if (is_win) {
73 component("libpng") {
74 public_deps = [ ":libpng_sources" ]
75 }
76 } else {
77 static_library("libpng") {
78 public_deps = [ ":libpng_sources" ]
79 }
80 }
OLDNEW
« 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