Chromium Code Reviews| Index: third_party/libpng/BUILD.gn |
| diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c03948c57e5c68f05b5d51588f9f9aee9fb31da9 |
| --- /dev/null |
| +++ b/third_party/libpng/BUILD.gn |
| @@ -0,0 +1,82 @@ |
| +# 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. |
| + ] |
| + } |
| + if (is_win) { |
| + if (component_mode == "shared_library") { |
| + defines += [ |
| + "PNG_USE_DLL", |
| + ] |
| + } |
| + } |
| +} |
| + |
| +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 = [ |
|
brettw
2014/01/09 05:23:54
You can delete these since it's in the config, and
tfarina
2014/01/09 22:58:47
Done.
|
| + "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" |
| + |
| + forward_dependent_configs_from = [ "//third_party/zlib" ] |
| + if (is_win) { |
|
brettw
2014/01/09 05:23:54
Same with this whole block.
tfarina
2014/01/09 22:58:47
Done.
|
| + # TODO(jschuh): http://crbug.com/167187 |
| + #'msvs_disabled_warnings': [ 4267 ], |
| + #'type': '<(component)', |
| + |
| + if (component_mode == "shared_library") { |
| + defines += [ |
| + "PNG_BUILD_DLL", |
| + "PNG_NO_MODULEDEF", |
| + ] |
| + } |
| + } else { |
| + #'type': 'static_library', |
| + } |
| + |
| + deps = [ |
| + "//third_party/zlib", |
| + ] |
| +} |