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 'includes': [ 7 '../../build/win_precompile.gypi', 8 ], 9 'variables': { 10 'variables': { 11 'conditions': [ 12 ['sysroot!=""', { 13 'pkg-config': '<(chroot_cmd) ../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"', 14 }, { 15 'pkg-config': 'pkg-config' 16 }], 17 ], 18 }, 19 20 'pkg-config': '<(pkg-config)', 21 22 'conditions': [ 23 ['OS=="linux" and (buildtype!="Official" or chromeos==1)', { 24 # Since version 1.31.0, pangoft2 which we depend on pulls in harfbuzz 25 # anyways. However, we want to have control of the version of harfbuzz 26 # we use, so don't use system harfbuzz for official builds, unless we 27 # are building for chrome os, where we have the system harfbuzz under 28 # control as well. 29 'use_system_harfbuzz%': '<!(python ../../build/check_return_value.py <(pkg-config) --atleast-version=1.31.0 pangoft2)', 30 }, { 31 'use_system_harfbuzz': 0, 32 }], 33 ], 34 }, 35 'conditions': [ 36 ['use_system_harfbuzz==0', { 37 'targets': [ 38 { 39 'target_name': 'harfbuzz-ng', 40 'type': 'static_library', 41 'defines': [ 42 'HAVE_OT', 43 'HAVE_ICU', 44 'HAVE_ICU_BUILTIN', 45 'HB_NO_MT', 46 ], 47 'sources': [ 48 'src/hb-atomic-private.hh', 49 'src/hb-blob.cc', 50 'src/hb-blob.h', 51 'src/hb-buffer.cc', 52 'src/hb-buffer-deserialize-json.hh', 53 'src/hb-buffer-deserialize-text.hh', 54 'src/hb-buffer.h', 55 'src/hb-buffer-private.hh', 56 'src/hb-buffer-serialize.cc', 57 'src/hb-cache-private.hh', 58 'src/hb-common.cc', 59 'src/hb-common.h', 60 'src/hb-deprecated.h', 61 'src/hb-face.cc', 62 'src/hb-face.h', 63 'src/hb-face-private.hh', 64 'src/hb-fallback-shape.cc', 65 'src/hb-font.cc', 66 'src/hb-font.h', 67 'src/hb-font-private.hh', 68 'src/hb.h', 69 'src/hb-icu.cc', 70 'src/hb-icu.h', 71 'src/hb-mutex-private.hh', 72 'src/hb-object-private.hh', 73 'src/hb-open-file-private.hh', 74 'src/hb-open-type-private.hh', 75 'src/hb-ot.h', 76 'src/hb-ot-head-table.hh', 77 'src/hb-ot-hhea-table.hh', 78 'src/hb-ot-hmtx-table.hh', 79 'src/hb-ot-layout.cc', 80 'src/hb-ot-layout-common-private.hh', 81 'src/hb-ot-layout-gdef-table.hh', 82 'src/hb-ot-layout-gpos-table.hh', 83 'src/hb-ot-layout-gsubgpos-private.hh', 84 'src/hb-ot-layout-gsub-table.hh', 85 'src/hb-ot-layout.h', 86 'src/hb-ot-layout-private.hh', 87 'src/hb-ot-map.cc', 88 'src/hb-ot-map-private.hh', 89 'src/hb-ot-maxp-table.hh', 90 'src/hb-ot-name-table.hh', 91 'src/hb-ot-shape.cc', 92 'src/hb-ot-shape-complex-arabic.cc', 93 'src/hb-ot-shape-complex-arabic-fallback.hh', 94 'src/hb-ot-shape-complex-arabic-table.hh', 95 'src/hb-ot-shape-complex-default.cc', 96 'src/hb-ot-shape-complex-hangul.cc', 97 'src/hb-ot-shape-complex-hebrew.cc', 98 'src/hb-ot-shape-complex-indic.cc', 99 'src/hb-ot-shape-complex-indic-machine.hh', 100 'src/hb-ot-shape-complex-indic-private.hh', 101 'src/hb-ot-shape-complex-indic-table.cc', 102 'src/hb-ot-shape-complex-myanmar.cc', 103 'src/hb-ot-shape-complex-myanmar-machine.hh', 104 'src/hb-ot-shape-complex-private.hh', 105 'src/hb-ot-shape-complex-sea.cc', 106 'src/hb-ot-shape-complex-sea-machine.hh', 107 'src/hb-ot-shape-complex-thai.cc', 108 'src/hb-ot-shape-complex-tibetan.cc', 109 'src/hb-ot-shape-fallback.cc', 110 'src/hb-ot-shape-fallback-private.hh', 111 'src/hb-ot-shape.h', 112 'src/hb-ot-shape-normalize.cc', 113 'src/hb-ot-shape-normalize-private.hh', 114 'src/hb-ot-shape-private.hh', 115 'src/hb-ot-tag.cc', 116 'src/hb-ot-tag.h', 117 'src/hb-private.hh', 118 'src/hb-set.cc', 119 'src/hb-set.h', 120 'src/hb-set-private.hh', 121 'src/hb-shape.cc', 122 'src/hb-shape.h', 123 'src/hb-shape-plan.cc', 124 'src/hb-shape-plan.h', 125 'src/hb-shape-plan-private.hh', 126 'src/hb-shaper.cc', 127 'src/hb-shaper-impl-private.hh', 128 'src/hb-shaper-list.hh', 129 'src/hb-shaper-private.hh', 130 'src/hb-unicode.cc', 131 'src/hb-unicode.h', 132 'src/hb-unicode-private.hh', 133 'src/hb-utf-private.hh', 134 'src/hb-version.h', 135 'src/hb-warning.cc', 136 ], 137 'include_dirs': [ 138 'src', 139 ], 140 'direct_dependent_settings': { 141 'include_dirs': [ 142 'src', 143 ], 144 }, 145 'dependencies': [ 146 '../../third_party/icu/icu.gyp:icuuc', 147 ], 148 'conditions': [ 149 ['clang==1', { 150 'xcode_settings': { 151 'WARNING_CFLAGS': [ 152 '-Wno-unused-value', 153 ], 154 }, 155 'cflags': [ 156 '-Wno-unused-value', 157 ] 158 }], 159 ['OS=="win"', { 160 # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int 161 'msvs_disabled_warnings': [4267, 4334], 162 }], 163 ['OS=="mac"', { 164 'defines': [ 165 'HAVE_CORETEXT', 166 ], 167 'sources': [ 168 'src/hb-coretext.cc', 169 'src/hb-coretext.h', 170 ], 171 }], 172 ], 173 }, 174 ], 175 }, { # use_system_harfbuzz==1 176 'targets': [ 177 { 178 'target_name': 'harfbuzz-ng', 179 'type': 'none', 180 'cflags': [ 181 '<!@(<(pkg-config) --cflags harfbuzz)', 182 ], 183 'direct_dependent_settings': { 184 'cflags': [ 185 '<!@(<(pkg-config) --cflags harfbuzz)', 186 ], 187 }, 188 'link_settings': { 189 'ldflags': [ 190 '<!@(<(pkg-config) --libs-only-L --libs-only-other harfbuzz)', 191 ], 192 'libraries': [ 193 '<!@(<(pkg-config) --libs-only-l harfbuzz)', 194 ], 195 }, 196 }, 197 ], 198 }], 199 ], 200 } 201