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

Side by Side Diff: third_party/libpng/BUILD.gn

Issue 1318823008: Un-nest configs in GN files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 defines = [ 8 defines = [
9 "CHROME_PNG_WRITE_SUPPORT", 9 "CHROME_PNG_WRITE_SUPPORT",
10 "PNG_USER_CONFIG", 10 "PNG_USER_CONFIG",
11 ] 11 ]
12 12
13 if (is_android) { 13 if (is_android) {
14 #'toolsets': ['target', 'host'], 14 #'toolsets': ['target', 'host'],
15 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype. 15 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype.
16 } 16 }
17 17
18 if (is_win) { 18 if (is_win) {
19 if (is_component_build) { 19 if (is_component_build) {
20 defines += [ 20 defines += [
21 "PNG_USE_DLL", 21 "PNG_USE_DLL",
22 "PNG_NO_MODULEDEF", 22 "PNG_NO_MODULEDEF",
23 ] 23 ]
24 } 24 }
25 } 25 }
26 } 26 }
27 27
28 # Must be in a config because of how GN orders flags (otherwise -Wall will
29 # appear after this, and turn it back on).
30 config("clang_warnings") {
31 if (is_clang) {
32 # Upstream uses self-assignment to avoid warnings.
33 cflags = [ "-Wno-self-assign" ]
34 }
35 }
36
28 source_set("libpng_sources") { 37 source_set("libpng_sources") {
29 sources = [ 38 sources = [
30 "png.c", 39 "png.c",
31 "png.h", 40 "png.h",
32 "pngconf.h", 41 "pngconf.h",
33 "pngerror.c", 42 "pngerror.c",
34 "pnggccrd.c", 43 "pnggccrd.c",
35 "pngget.c", 44 "pngget.c",
36 "pngmem.c", 45 "pngmem.c",
37 "pngpread.c", 46 "pngpread.c",
(...skipping 17 matching lines...) Expand all
55 if (is_win && is_component_build) { 64 if (is_win && is_component_build) {
56 defines = [ "PNG_BUILD_DLL" ] 65 defines = [ "PNG_BUILD_DLL" ]
57 } 66 }
58 67
59 public_configs = [ ":libpng_config" ] 68 public_configs = [ ":libpng_config" ]
60 69
61 public_deps = [ 70 public_deps = [
62 "//third_party/zlib", 71 "//third_party/zlib",
63 ] 72 ]
64 73
65 # Must be in a config because of how GN orders flags (otherwise -Wall will
66 # appear after this, and turn it back on).
67 config("clang_warnings") {
68 if (is_clang) {
69 # Upstream uses self-assignment to avoid warnings.
70 cflags = [ "-Wno-self-assign" ]
71 }
72 }
73 configs += [ ":clang_warnings" ] 74 configs += [ ":clang_warnings" ]
74 } 75 }
75 76
76 if (is_win) { 77 if (is_win) {
77 component("libpng") { 78 component("libpng") {
78 public_deps = [ 79 public_deps = [
79 ":libpng_sources", 80 ":libpng_sources",
80 ] 81 ]
81 } 82 }
82 } else { 83 } else {
83 group("libpng") { 84 group("libpng") {
84 public_deps = [ 85 public_deps = [
85 ":libpng_sources", 86 ":libpng_sources",
86 ] 87 ]
87 } 88 }
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698