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

Unified Diff: tools/gn/secondary/third_party/libpng/BUILD.gn

Issue 123613008: Add BUILD.gn file to build libpng. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/secondary/third_party/libpng/BUILD.gn
diff --git a/tools/gn/secondary/third_party/libpng/BUILD.gn b/tools/gn/secondary/third_party/libpng/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..293fcdb7aca40bdc7bfc5a47d49f4f99c16a8ae6
--- /dev/null
+++ b/tools/gn/secondary/third_party/libpng/BUILD.gn
@@ -0,0 +1,83 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("libpng_config") {
+ include_dirs = [
+ ".",
+ ]
+
+ defines = [
+ "CHROME_PNG_WRITE_SUPPORT",
+ "PNG_USER_CONFIG",
+ ]
+ if (is_android) {
+ #'toolsets': ['target', 'host'],
+ defines = [
+ "CHROME_PNG_READ_PACK_SUPPORT", # Required by freetype.
+ ]
+ }
+}
+
+static_library("libpng") {
+ sources = [
+ "png.c",
+ "png.h",
+ "pngconf.h",
+ "pngerror.c",
+ "pnggccrd.c",
+ "pngget.c",
+ "pngmem.c",
+ "pngpread.c",
+ "pngread.c",
+ "pngrio.c",
+ "pngrtran.c",
+ "pngrutil.c",
+ "pngset.c",
+ "pngtrans.c",
+ "pngusr.h",
+ "pngvcrd.c",
+ "pngwio.c",
+ "pngwrite.c",
+ "pngwtran.c",
+ "pngwutil.c",
+ ]
+
+ defines = [
+ "CHROME_PNG_WRITE_SUPPORT",
+ "PNG_USER_CONFIG",
+ ]
+
+ direct_dependent_configs = [ ":libpng_config" ]
+
+ configs -= "//build/config/compiler:chromium_code"
+ configs += "//build/config/compiler:no_chromium_code"
tfarina 2014/01/06 23:20:41 can you make this optional? I found this awkward,
+
+ #'export_dependent_settings': [
+ # '../zlib/zlib.gyp:zlib',
+ #],
+
+ if (is_win) {
+ # TODO(jschuh): http://crbug.com/167187
+ #'msvs_disabled_warnings': [ 4267 ],
+ #'type': '<(component)',
+
+ #if (component=="shared_library"') {
+# defines = [
+# "PNG_BUILD_DLL",
+# "PNG_NO_MODULEDEF",
+# ]
+# 'direct_dependent_settings': {
+# defines = [
+# "PNG_USE_DLL",
+# ]
+# },
+ } else {
+ #['OS!="win"', {'product_name': 'png'}],
+ #'type': 'static_library',
+ }
+
+ deps = [
+ "//third_party/zlib",
+ ]
+}
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698