diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-21 16:53:19 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-21 16:53:19 +0000 |
commit | c67679fcd04b5e69400e3d4c55019b3aaf915780 (patch) | |
tree | eef4e67df703e41ff43bcf1a2cb73a3ba712af06 /third_party | |
parent | 8e9ba76ba55c1624567dd81599cc526528e8e5e6 (diff) | |
download | chromium_src-c67679fcd04b5e69400e3d4c55019b3aaf915780.zip chromium_src-c67679fcd04b5e69400e3d4c55019b3aaf915780.tar.gz chromium_src-c67679fcd04b5e69400e3d4c55019b3aaf915780.tar.bz2 |
Add harfbuzz to the GN build.
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/284313010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/harfbuzz-ng/BUILD.gn | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn new file mode 100644 index 0000000..1e48dfe --- /dev/null +++ b/third_party/harfbuzz-ng/BUILD.gn @@ -0,0 +1,153 @@ +# 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. + +# The GYP build supports system harfbuzz for non-official builds when using +# pangoft2 1.31.0 or greater (which pulls it in). +# TODO(brettw) we can consider doing this as well, although the benefit is +# unclear and requires shelling out to a script to check the version. +# +# ChromeOS uses an up-to-date system one that we have control over, so we +# don't want to bloat the binary more by including another copy. +use_system_harfbuzz = is_chromeos + +if (use_system_harfbuzz) { + import("//build/config/linux/pkg_config.gni") + pkg_config("harfbuzz_pkgconfig") { + packages = [ "harfbuzz" ] + } + group("harfbuzz-ng") { + direct_dependent_configs = [ ":harfbuzz_pkgconfig" ] + } + +} else { + config("harfbuzz-ng_config") { + include_dirs = [ "src" ] + } + + source_set("harfbuzz-ng") { + sources = [ + "src/hb-atomic-private.hh", + "src/hb-blob.cc", + "src/hb-blob.h", + "src/hb-buffer.cc", + "src/hb-buffer-deserialize-json.hh", + "src/hb-buffer-deserialize-text.hh", + "src/hb-buffer.h", + "src/hb-buffer-private.hh", + "src/hb-buffer-serialize.cc", + "src/hb-cache-private.hh", + "src/hb-common.cc", + "src/hb-common.h", + "src/hb-deprecated.h", + "src/hb-face.cc", + "src/hb-face.h", + "src/hb-face-private.hh", + "src/hb-fallback-shape.cc", + "src/hb-font.cc", + "src/hb-font.h", + "src/hb-font-private.hh", + "src/hb.h", + "src/hb-icu.cc", + "src/hb-icu.h", + "src/hb-mutex-private.hh", + "src/hb-object-private.hh", + "src/hb-open-file-private.hh", + "src/hb-open-type-private.hh", + "src/hb-ot.h", + "src/hb-ot-head-table.hh", + "src/hb-ot-hhea-table.hh", + "src/hb-ot-hmtx-table.hh", + "src/hb-ot-layout.cc", + "src/hb-ot-layout-common-private.hh", + "src/hb-ot-layout-gdef-table.hh", + "src/hb-ot-layout-gpos-table.hh", + "src/hb-ot-layout-gsubgpos-private.hh", + "src/hb-ot-layout-gsub-table.hh", + "src/hb-ot-layout.h", + "src/hb-ot-layout-private.hh", + "src/hb-ot-map.cc", + "src/hb-ot-map-private.hh", + "src/hb-ot-maxp-table.hh", + "src/hb-ot-name-table.hh", + "src/hb-ot-shape.cc", + "src/hb-ot-shape-complex-arabic.cc", + "src/hb-ot-shape-complex-arabic-fallback.hh", + "src/hb-ot-shape-complex-arabic-table.hh", + "src/hb-ot-shape-complex-default.cc", + "src/hb-ot-shape-complex-hangul.cc", + "src/hb-ot-shape-complex-hebrew.cc", + "src/hb-ot-shape-complex-indic.cc", + "src/hb-ot-shape-complex-indic-machine.hh", + "src/hb-ot-shape-complex-indic-private.hh", + "src/hb-ot-shape-complex-indic-table.cc", + "src/hb-ot-shape-complex-myanmar.cc", + "src/hb-ot-shape-complex-myanmar-machine.hh", + "src/hb-ot-shape-complex-private.hh", + "src/hb-ot-shape-complex-sea.cc", + "src/hb-ot-shape-complex-sea-machine.hh", + "src/hb-ot-shape-complex-thai.cc", + "src/hb-ot-shape-complex-tibetan.cc", + "src/hb-ot-shape-fallback.cc", + "src/hb-ot-shape-fallback-private.hh", + "src/hb-ot-shape.h", + "src/hb-ot-shape-normalize.cc", + "src/hb-ot-shape-normalize-private.hh", + "src/hb-ot-shape-private.hh", + "src/hb-ot-tag.cc", + "src/hb-ot-tag.h", + "src/hb-private.hh", + "src/hb-set.cc", + "src/hb-set.h", + "src/hb-set-private.hh", + "src/hb-shape.cc", + "src/hb-shape.h", + "src/hb-shape-plan.cc", + "src/hb-shape-plan.h", + "src/hb-shape-plan-private.hh", + "src/hb-shaper.cc", + "src/hb-shaper-impl-private.hh", + "src/hb-shaper-list.hh", + "src/hb-shaper-private.hh", + "src/hb-unicode.cc", + "src/hb-unicode.h", + "src/hb-unicode-private.hh", + "src/hb-utf-private.hh", + "src/hb-version.h", + "src/hb-warning.cc", + ] + + defines = [ + "HAVE_OT", + "HAVE_ICU", + "HAVE_ICU_BUILTIN", + "HB_NO_MT", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + direct_dependent_configs = [ ":harfbuzz-ng_config" ] + + deps = [ + "//third_party/icu:icuuc", + ] + + cflags = [] + if (is_clang) { + cflags += [ "-Wno-unused-value" ] + } + if (is_win) { + cflags += [ + "/wd4267", # size_t to 'type' converion. + "/wd4334", # Result of 32-bit shift implicitly converted to 64 bits. + ] + } + if (is_mac) { + sources += [ + "src/hb-coretext.cc", + "src/hb-coretext.h", + ] + defines += [ "HAVE_CORETEXT" ] + } + } +} |