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

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: 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
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" ] 67 forward_dependent_configs_from = [ "//third_party/zlib" ]
64 68
65 direct_dependent_configs = [ ":libpng_config" ] 69 direct_dependent_configs = [ ":libpng_config" ]
66 70
67 deps = [ 71 deps = [
68 "//third_party/zlib", 72 "//third_party/zlib",
69 ] 73 ]
70 } 74 }
75
76 if (is_win) {
77 component("libpng") {
78 deps = [ ":libpng_sources" ]
79
80 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.
81 }
82 } else {
83 static_library("libpng") {
84 deps = [ ":libpng_sources" ]
85
86 forward_dependent_configs_from = [ ":libpng_sources" ]
87 }
88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698