Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/freetype/freetype.gni") | |
| 7 import("//build/config/ui.gni") | |
| 8 import("//build/config/ui.gni") | |
|
bungeman-chromium
2017/05/10 16:45:33
This line is here twice?
| |
| 9 import("//third_party/harfbuzz-ng/harfbuzz.gni") | |
| 6 | 10 |
| 7 declare_args() { | 11 # Only to be used as an intermediate target to resolve the cyclic dependency |
| 8 # Blink needs a recent and properly build-configured FreeType version to | 12 # between FreeType and Harfbuzz in HarfBuzz' BUILD.gn |
| 9 # support OpenType variations, color emoji and avoid security bugs. By default | 13 group("freetype-without-harfbuzz") { |
| 10 # we ship and link such a version as part of Chrome. For distributions that | |
| 11 # prefer to keep linking to the version the system, FreeType must be newer | |
| 12 # than version 2.7.1 and have color bitmap support compiled in. WARNING: | |
| 13 # System FreeType configurations other than as described WILL INTRODUCE TEXT | |
| 14 # RENDERING AND SECURITY REGRESSIONS. | |
| 15 use_system_freetype = false | |
| 16 } | |
| 17 | |
| 18 group("freetype") { | |
| 19 if (use_system_freetype) { | 14 if (use_system_freetype) { |
| 20 public_configs = [ "//build/linux:freetype_from_pkgconfig" ] | 15 public_configs = [ "//build/linux:freetype_from_pkgconfig" ] |
| 21 } else { | 16 } else { |
| 22 public_deps = [ | 17 public_deps = [ |
| 23 "//third_party/freetype", | 18 "//third_party/freetype", |
| 24 ] | 19 ] |
| 25 } | 20 } |
| 26 } | 21 } |
| 22 | |
| 23 # Maybe switch name and reduce diff-size by calling the previous target | |
| 24 # something like freetype2-intermediate or so, and this one - as before - | |
| 25 # freetype2. | |
| 26 group("freetype") { | |
| 27 if (use_system_freetype) { | |
| 28 public_configs = [ "//build/linux:freetype_from_pkgconfig" ] | |
| 29 } else { | |
| 30 public_deps = [ | |
| 31 # HarfBuzz dependency needed in order for FreeType autohinting to detect | |
| 32 # ligatures and other OpenType mappings. | |
| 33 ":freetype-without-harfbuzz", | |
| 34 "//third_party/harfbuzz-ng:harfbuzz-ng", | |
| 35 ] | |
| 36 if (is_linux && use_pango && !use_system_harfbuzz) { | |
| 37 public_deps += [ "//third_party/harfbuzz-ng:harfbuzz-ng-ft" ] | |
| 38 } | |
| 39 } | |
| 40 } | |
| OLD | NEW |