forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.gn
76 lines (63 loc) · 1.71 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/build/zip_bundle.gni")
executable("_font-subset") {
output_name = "font-subset"
sources = [
"hb_wrappers.h",
"main.cc",
]
deps = [ "//third_party/harfbuzz:harfbuzz_subset" ]
if (is_mac) {
frameworks = [
"Foundation.framework",
"CoreGraphics.framework",
"CoreText.framework",
]
}
metadata = {
font_subset_without_entitlement = [ "font-subset" ]
}
}
generated_file("font_entitlement_config") {
outputs = [ "$target_gen_dir/font_subset_without_entitlements.txt" ]
data_keys = [ "font_subset_without_entitlement" ]
deps = [ ":_font-subset" ]
}
zip_bundle("font-subset") {
if (is_mac) {
# Mac artifacts sometimes use mac and sometimes darwin. Standardizing the
# names will require changes in the list of artifacts the tool is downloading.
output = "darwin-${target_cpu}/font-subset.zip"
} else {
output = "${full_target_platform_name}/font-subset.zip"
}
font_subset_bin = "font-subset"
if (is_win) {
font_subset_bin = "${font_subset_bin}.exe"
}
files = [
{
source = "$root_build_dir/$font_subset_bin"
destination = font_subset_bin
},
{
source = "$root_gen_dir/const_finder.dart.snapshot"
destination = "const_finder.dart.snapshot"
},
]
deps = [
":_font-subset",
"//flutter/tools/const_finder",
]
if (is_mac) {
deps += [ ":font_entitlement_config" ]
files += [
{
source = "$target_gen_dir/font_subset_without_entitlements.txt"
destination = "without_entitlements.txt"
},
]
}
}