OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 { |
| 6 'variables': { |
| 7 'gcc_cflags': [ |
| 8 '-ggdb', |
| 9 '-W', |
| 10 '-Wall', |
| 11 '-Wshadow', |
| 12 '-Wno-unused-parameter', |
| 13 '-fPIE', |
| 14 '-fstack-protector', |
| 15 ], |
| 16 'gcc_ldflags': [ |
| 17 '-ggdb', |
| 18 '-fpie', |
| 19 '-Wl,-z,relro', |
| 20 '-Wl,-z,now', |
| 21 ], |
| 22 }, |
| 23 'includes': [ |
| 24 'ots-common.gypi', |
| 25 ], |
| 26 'target_defaults': { |
| 27 'include_dirs': [ |
| 28 '.', |
| 29 'third_party/brotli/dec', |
| 30 ], |
| 31 'conditions': [ |
| 32 ['OS=="linux"', { |
| 33 'cflags': [ |
| 34 '<@(gcc_cflags)', |
| 35 '-O', |
| 36 ], |
| 37 'ldflags': [ |
| 38 '<@(gcc_ldflags)', |
| 39 ], |
| 40 'defines': [ |
| 41 '_FORTIFY_SOURCE=2', |
| 42 ], |
| 43 'link_settings': { |
| 44 'libraries': ['-lz'], |
| 45 }, |
| 46 }], |
| 47 ['OS=="mac"', { |
| 48 'xcode_settings': { |
| 49 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 50 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 51 'OTHER_CFLAGS': [ |
| 52 '<@(gcc_cflags)', |
| 53 ], |
| 54 }, |
| 55 'link_settings': { |
| 56 'libraries': [ |
| 57 '/System/Library/Frameworks/ApplicationServices.framework', |
| 58 '/usr/lib/libz.dylib' |
| 59 ], |
| 60 }, |
| 61 }], |
| 62 ['OS=="win"', { |
| 63 'link_settings': { |
| 64 'libraries': [ |
| 65 '-lzdll.lib', |
| 66 ], |
| 67 }, |
| 68 'msvs_settings': { |
| 69 'VCLinkerTool': { |
| 70 'AdditionalLibraryDirectories': ['third_party/zlib'], |
| 71 'DelayLoadDLLs': ['zlib1.dll'], |
| 72 }, |
| 73 }, |
| 74 'include_dirs': [ |
| 75 'third_party/zlib', |
| 76 ], |
| 77 'defines': [ |
| 78 'NOMINMAX', # To suppress max/min macro definition. |
| 79 'WIN32', |
| 80 ], |
| 81 }], |
| 82 ], |
| 83 }, |
| 84 'targets': [ |
| 85 { |
| 86 'target_name': 'ots', |
| 87 'type': 'static_library', |
| 88 'sources': [ |
| 89 '<@(ots_sources)', |
| 90 ], |
| 91 'dependencies': [ |
| 92 'third_party/brotli.gyp:brotli', |
| 93 ], |
| 94 'include_dirs': [ |
| 95 '<@(ots_include_dirs)', |
| 96 ], |
| 97 'direct_dependent_settings': { |
| 98 'include_dirs': [ |
| 99 '<@(ots_include_dirs)', |
| 100 ], |
| 101 }, |
| 102 }, |
| 103 { |
| 104 'target_name': 'freetype2', |
| 105 'type': 'none', |
| 106 'conditions': [ |
| 107 ['OS=="linux"', { |
| 108 'direct_dependent_settings': { |
| 109 'cflags': [ |
| 110 '<!(pkg-config freetype2 --cflags)', |
| 111 ], |
| 112 'link_settings': { |
| 113 'libraries': [ |
| 114 '<!(pkg-config freetype2 --libs)', |
| 115 ], |
| 116 }, |
| 117 }, |
| 118 }], |
| 119 ], |
| 120 }, |
| 121 { |
| 122 'target_name': 'idempotent', |
| 123 'type': 'executable', |
| 124 'sources': [ |
| 125 'test/idempotent.cc', |
| 126 ], |
| 127 'dependencies': [ |
| 128 'ots', |
| 129 ], |
| 130 'conditions': [ |
| 131 ['OS=="linux"', { |
| 132 'dependencies': [ |
| 133 'freetype2', |
| 134 ] |
| 135 }], |
| 136 ['OS=="win"', { |
| 137 'link_settings': { |
| 138 'libraries': [ |
| 139 '-lgdi32.lib', |
| 140 ], |
| 141 }, |
| 142 }], |
| 143 ], |
| 144 }, |
| 145 { |
| 146 'target_name': 'ot-sanitise', |
| 147 'type': 'executable', |
| 148 'sources': [ |
| 149 'test/ot-sanitise.cc', |
| 150 'test/file-stream.h', |
| 151 ], |
| 152 'dependencies': [ |
| 153 'ots', |
| 154 ], |
| 155 }, |
| 156 ], |
| 157 'conditions': [ |
| 158 ['OS=="linux" or OS=="mac"', { |
| 159 'targets': [ |
| 160 { |
| 161 'target_name': 'validator_checker', |
| 162 'type': 'executable', |
| 163 'sources': [ |
| 164 'test/validator-checker.cc', |
| 165 ], |
| 166 'dependencies': [ |
| 167 'ots', |
| 168 ], |
| 169 'conditions': [ |
| 170 ['OS=="linux"', { |
| 171 'dependencies': [ |
| 172 'freetype2', |
| 173 ] |
| 174 }], |
| 175 ], |
| 176 }, |
| 177 { |
| 178 'target_name': 'perf', |
| 179 'type': 'executable', |
| 180 'sources': [ |
| 181 'test/perf.cc', |
| 182 ], |
| 183 'dependencies': [ |
| 184 'ots', |
| 185 ], |
| 186 }, |
| 187 { |
| 188 'target_name': 'cff_type2_charstring_test', |
| 189 'type': 'executable', |
| 190 'sources': [ |
| 191 'test/cff_type2_charstring_test.cc', |
| 192 ], |
| 193 'dependencies': [ |
| 194 'ots', |
| 195 ], |
| 196 'libraries': [ |
| 197 '-lgtest', |
| 198 '-lgtest_main', |
| 199 ], |
| 200 'include_dirs': [ |
| 201 'src', |
| 202 ], |
| 203 }, |
| 204 { |
| 205 'target_name': 'layout_common_table_test', |
| 206 'type': 'executable', |
| 207 'sources': [ |
| 208 'test/layout_common_table_test.cc', |
| 209 ], |
| 210 'dependencies': [ |
| 211 'ots', |
| 212 ], |
| 213 'libraries': [ |
| 214 '-lgtest', |
| 215 '-lgtest_main', |
| 216 ], |
| 217 'include_dirs': [ |
| 218 'src', |
| 219 ], |
| 220 }, |
| 221 { |
| 222 'target_name': 'table_dependencies_test', |
| 223 'type': 'executable', |
| 224 'sources': [ |
| 225 'test/table_dependencies_test.cc', |
| 226 ], |
| 227 'dependencies': [ |
| 228 'ots', |
| 229 ], |
| 230 'libraries': [ |
| 231 '-lgtest', |
| 232 '-lgtest_main', |
| 233 ], |
| 234 'include_dirs': [ |
| 235 'src', |
| 236 ], |
| 237 }, |
| 238 ], |
| 239 }], |
| 240 ['OS=="linux"', { |
| 241 'targets': [ |
| 242 { |
| 243 'target_name': 'side_by_side', |
| 244 'type': 'executable', |
| 245 'sources': [ |
| 246 'test/side-by-side.cc', |
| 247 ], |
| 248 'dependencies': [ |
| 249 'freetype2', |
| 250 'ots', |
| 251 ], |
| 252 }, |
| 253 ], |
| 254 }], |
| 255 ], |
| 256 } |
OLD | NEW |