| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'conditions': [ | 7 'conditions': [ |
| 8 [ 'OS=="none"', { | 8 [ 'OS=="none"', { |
| 9 # Because we have a patched zlib, we cannot use the system libz. | 9 # Because we have a patched zlib, we cannot use the system libz. |
| 10 # TODO(pvalchev): OpenBSD is purposefully left out, as the system | 10 # TODO(pvalchev): OpenBSD is purposefully left out, as the system |
| 11 # zlib brings up an incompatibility that breaks rendering. | 11 # zlib brings up an incompatibility that breaks rendering. |
| 12 'use_system_zlib%': 1, | 12 'use_system_zlib%': 1, |
| 13 }, { | 13 }, { |
| 14 'use_system_zlib%': 0, | 14 'use_system_zlib%': 0, |
| 15 }], | 15 }], |
| 16 ], | 16 ], |
| 17 'use_system_minizip%': 0, |
| 17 }, | 18 }, |
| 18 'targets': [ | 19 'targets': [ |
| 19 { | 20 { |
| 20 'target_name': 'zlib', | 21 'target_name': 'zlib', |
| 21 'type': 'static_library', | 22 'type': 'static_library', |
| 22 'conditions': [ | 23 'conditions': [ |
| 23 ['use_system_zlib==0', { | 24 ['use_system_zlib==0', { |
| 24 'sources': [ | 25 'sources': [ |
| 25 'contrib/minizip/ioapi.c', | |
| 26 'contrib/minizip/ioapi.h', | |
| 27 'contrib/minizip/iowin32.c', | |
| 28 'contrib/minizip/iowin32.h', | |
| 29 'contrib/minizip/unzip.c', | |
| 30 'contrib/minizip/unzip.h', | |
| 31 'contrib/minizip/zip.c', | |
| 32 'contrib/minizip/zip.h', | |
| 33 'adler32.c', | 26 'adler32.c', |
| 34 'compress.c', | 27 'compress.c', |
| 35 'crc32.c', | 28 'crc32.c', |
| 36 'crc32.h', | 29 'crc32.h', |
| 37 'deflate.c', | 30 'deflate.c', |
| 38 'deflate.h', | 31 'deflate.h', |
| 39 'gzio.c', | 32 'gzio.c', |
| 40 'infback.c', | 33 'infback.c', |
| 41 'inffast.c', | 34 'inffast.c', |
| 42 'inffast.h', | 35 'inffast.h', |
| 43 'inffixed.h', | 36 'inffixed.h', |
| 44 'inflate.c', | 37 'inflate.c', |
| 45 'inflate.h', | 38 'inflate.h', |
| 46 'inftrees.c', | 39 'inftrees.c', |
| 47 'inftrees.h', | 40 'inftrees.h', |
| 48 'mozzconf.h', | 41 'mozzconf.h', |
| 49 'trees.c', | 42 'trees.c', |
| 50 'trees.h', | 43 'trees.h', |
| 51 'uncompr.c', | 44 'uncompr.c', |
| 52 'zconf.h', | 45 'zconf.h', |
| 53 'zlib.h', | 46 'zlib.h', |
| 54 'zutil.c', | 47 'zutil.c', |
| 55 'zutil.h', | 48 'zutil.h', |
| 56 ], | 49 ], |
| 57 'include_dirs': [ | 50 'include_dirs': [ |
| 58 '.', | 51 '.', |
| 59 # For contrib/minizip | |
| 60 '../..', | |
| 61 ], | 52 ], |
| 62 'direct_dependent_settings': { | 53 'direct_dependent_settings': { |
| 63 'include_dirs': [ | 54 'include_dirs': [ |
| 64 '.', | 55 '.', |
| 65 ], | 56 ], |
| 66 }, | 57 }, |
| 67 'conditions': [ | 58 'conditions': [ |
| 68 ['OS!="win"', { | 59 ['OS!="win"', { |
| 69 'product_name': 'chrome_zlib', | 60 'product_name': 'chrome_zlib', |
| 70 'sources!': [ | |
| 71 'contrib/minizip/iowin32.c' | |
| 72 ], | |
| 73 }], ['OS=="android"', { | 61 }], ['OS=="android"', { |
| 74 'toolsets': ['target', 'host'], | 62 'toolsets': ['target', 'host'], |
| 75 }], | 63 }], |
| 76 ], | 64 ], |
| 77 }, { | 65 }, { |
| 78 'direct_dependent_settings': { | 66 'direct_dependent_settings': { |
| 79 'defines': [ | 67 'defines': [ |
| 80 'USE_SYSTEM_ZLIB', | 68 'USE_SYSTEM_ZLIB', |
| 81 ], | 69 ], |
| 82 }, | 70 }, |
| 83 'defines': [ | 71 'defines': [ |
| 84 'USE_SYSTEM_ZLIB', | 72 'USE_SYSTEM_ZLIB', |
| 85 ], | 73 ], |
| 86 'sources': [ | |
| 87 'contrib/minizip/ioapi.c', | |
| 88 'contrib/minizip/ioapi.h', | |
| 89 'contrib/minizip/unzip.c', | |
| 90 'contrib/minizip/unzip.h', | |
| 91 'contrib/minizip/zip.c', | |
| 92 'contrib/minizip/zip.h', | |
| 93 ], | |
| 94 'conditions': [ | |
| 95 ['OS=="android"', { | |
| 96 'toolsets': ['target', 'host'], | |
| 97 }], | |
| 98 ], | |
| 99 'link_settings': { | 74 'link_settings': { |
| 100 'libraries': [ | 75 'libraries': [ |
| 101 '-lz', | 76 '-lz', |
| 102 ], | 77 ], |
| 103 }, | 78 }, |
| 104 }], | 79 }], |
| 80 ], |
| 81 }, |
| 82 { |
| 83 'target_name': 'minizip', |
| 84 'type': 'static_library', |
| 85 'conditions': [ |
| 86 ['use_system_minizip==0', { |
| 87 'sources': [ |
| 88 'contrib/minizip/ioapi.c', |
| 89 'contrib/minizip/ioapi.h', |
| 90 'contrib/minizip/iowin32.c', |
| 91 'contrib/minizip/iowin32.h', |
| 92 'contrib/minizip/unzip.c', |
| 93 'contrib/minizip/unzip.h', |
| 94 'contrib/minizip/zip.c', |
| 95 'contrib/minizip/zip.h', |
| 96 ], |
| 97 'include_dirs': [ |
| 98 '.', |
| 99 '../..', |
| 100 ], |
| 101 'direct_dependent_settings': { |
| 102 'include_dirs': [ |
| 103 '.', |
| 104 ], |
| 105 }, |
| 106 'conditions': [ |
| 107 ['OS!="win"', { |
| 108 'sources!': [ |
| 109 'contrib/minizip/iowin32.c' |
| 110 ], |
| 111 }], |
| 112 ['OS=="android"', { |
| 113 'toolsets': ['target', 'host'], |
| 114 }], |
| 115 ], |
| 116 }, { |
| 117 'direct_dependent_settings': { |
| 118 'defines': [ |
| 119 'USE_SYSTEM_MINIZIP', |
| 120 ], |
| 121 }, |
| 122 'defines': [ |
| 123 'USE_SYSTEM_MINIZIP', |
| 124 ], |
| 125 'link_settings': { |
| 126 'libraries': [ |
| 127 '-lminizip', |
| 128 ], |
| 129 }, |
| 130 }], |
| 105 ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', { | 131 ['OS=="mac" or OS=="ios" or os_bsd==1 or OS=="android"', { |
| 106 # Mac, Android and the BSDs don't have fopen64, ftello64, or | 132 # Mac, Android and the BSDs don't have fopen64, ftello64, or |
| 107 # fseeko64. We use fopen, ftell, and fseek instead on these | 133 # fseeko64. We use fopen, ftell, and fseek instead on these |
| 108 # systems. | 134 # systems. |
| 109 'defines': [ | 135 'defines': [ |
| 110 'USE_FILE32API' | 136 'USE_FILE32API' |
| 111 ], | 137 ], |
| 112 }], | 138 }], |
| 113 ['clang==1', { | 139 ['clang==1', { |
| 114 'xcode_settings': { | 140 'xcode_settings': { |
| 115 'WARNING_CFLAGS': [ | 141 'WARNING_CFLAGS': [ |
| 116 # zlib uses `if ((a == b))` for some reason. | 142 # zlib uses `if ((a == b))` for some reason. |
| 117 '-Wno-parentheses-equality', | 143 '-Wno-parentheses-equality', |
| 118 ], | 144 ], |
| 119 }, | 145 }, |
| 120 'cflags': [ | 146 'cflags': [ |
| 121 '-Wno-parentheses-equality', | 147 '-Wno-parentheses-equality', |
| 122 ], | 148 ], |
| 123 }], | 149 }], |
| 124 ], | 150 ], |
| 125 } | 151 } |
| 126 ], | 152 ], |
| 127 } | 153 } |
| OLD | NEW |