Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 config("libpng_config") { | |
| 6 include_dirs = [ | |
| 7 ".", | |
| 8 ] | |
| 9 | |
| 10 defines = [ | |
| 11 "CHROME_PNG_WRITE_SUPPORT", | |
| 12 "PNG_USER_CONFIG", | |
| 13 ] | |
| 14 if (is_android) { | |
| 15 #'toolsets': ['target', 'host'], | |
| 16 defines += [ | |
| 17 "CHROME_PNG_READ_PACK_SUPPORT", # Required by freetype. | |
| 18 ] | |
| 19 } | |
| 20 if (is_win) { | |
| 21 if (component_mode == "shared_library") { | |
| 22 defines += [ | |
| 23 "PNG_USE_DLL", | |
| 24 ] | |
| 25 } | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 static_library("libpng") { | |
| 30 sources = [ | |
| 31 "png.c", | |
| 32 "png.h", | |
| 33 "pngconf.h", | |
| 34 "pngerror.c", | |
| 35 "pnggccrd.c", | |
| 36 "pngget.c", | |
| 37 "pngmem.c", | |
| 38 "pngpread.c", | |
| 39 "pngread.c", | |
| 40 "pngrio.c", | |
| 41 "pngrtran.c", | |
| 42 "pngrutil.c", | |
| 43 "pngset.c", | |
| 44 "pngtrans.c", | |
| 45 "pngusr.h", | |
| 46 "pngvcrd.c", | |
| 47 "pngwio.c", | |
| 48 "pngwrite.c", | |
| 49 "pngwtran.c", | |
| 50 "pngwutil.c", | |
| 51 ] | |
| 52 | |
| 53 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.
| |
| 54 "CHROME_PNG_WRITE_SUPPORT", | |
| 55 "PNG_USER_CONFIG", | |
| 56 ] | |
| 57 | |
| 58 direct_dependent_configs = [ ":libpng_config" ] | |
| 59 | |
| 60 configs -= "//build/config/compiler:chromium_code" | |
| 61 configs += "//build/config/compiler:no_chromium_code" | |
| 62 | |
| 63 forward_dependent_configs_from = [ "//third_party/zlib" ] | |
| 64 if (is_win) { | |
|
brettw
2014/01/09 05:23:54
Same with this whole block.
tfarina
2014/01/09 22:58:47
Done.
| |
| 65 # TODO(jschuh): http://crbug.com/167187 | |
| 66 #'msvs_disabled_warnings': [ 4267 ], | |
| 67 #'type': '<(component)', | |
| 68 | |
| 69 if (component_mode == "shared_library") { | |
| 70 defines += [ | |
| 71 "PNG_BUILD_DLL", | |
| 72 "PNG_NO_MODULEDEF", | |
| 73 ] | |
| 74 } | |
| 75 } else { | |
| 76 #'type': 'static_library', | |
| 77 } | |
| 78 | |
| 79 deps = [ | |
| 80 "//third_party/zlib", | |
| 81 ] | |
| 82 } | |
| OLD | NEW |