Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: third_party/freetype/BUILD.gn

Issue 2879843003: Revert of Build FreeType with HarfBuzz support (Closed)
Patch Set: Fix CL to apply cleanly Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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/chromecast_build.gni") 5 import("//build/config/chromecast_build.gni")
6 import("//third_party/harfbuzz-ng/harfbuzz.gni")
7 6
8 config("freetype_config") { 7 config("freetype_config") {
9 include_dirs = [ 8 include_dirs = [
10 "include", 9 "include",
11 "src/include", 10 "src/include",
12 ] 11 ]
13 } 12 }
14 13
15 config("freetype-warnings") { 14 config("freetype-warnings") {
16 cflags = [] 15 cflags = []
17 16
18 if (is_clang) { 17 if (is_clang) {
19 # The reduction of FreeType files to a minimum triggers -Wunused-function 18 # The reduction of FreeType files to a minimum triggers -Wunused-function
20 # warnings in ftbase.c 19 # warnings in ftbase.c
21 20
22 # "-Wno-int-to-pointer-cast" tracked by 21 # "-Wno-int-to-pointer-cast" tracked by
23 # https://savannah.nongnu.org/bugs/index.php?50560, 22 # https://savannah.nongnu.org/bugs/index.php?50560,
24 # TODO(drott): Remove this once we roll past 7aeee3c50f2656b65f. 23 # TODO(drott): Remove this once we roll past 7aeee3c50f2656b65f.
25 cflags += [ 24 cflags += [
26 "-Wno-unused-function", 25 "-Wno-unused-function",
27 "-Wno-int-to-pointer-cast", 26 "-Wno-int-to-pointer-cast",
28 ] 27 ]
29 } 28 }
30 } 29 }
31 30
32 # This component is used to resolve a cyclic dependency between HarfBuzz and
33 # FreeType. HarfBuzz needs basic FreeType glyph information symbols for its
34 # hb-ft.* functions, FreeType needs HarfBuzz' OpenType parsing functionality in
35 # the autohinting code. We start by building a minimum FreeType here - enough to
36 # satisfy harfbuzz-ng-ft symbol requirements. Then we can build harfbuzz-ng-ft
37 # based on the minimal FreeType and harfbuzz-ng which does not depend on
38 # FreeType itself. Then we build FreeType depending on harfbuzz-ng-ft and
39 # harfbuzz-ng.
40 static_library("bootstrap_freetype_for_harfbuzz") {
41 visibility = [
42 "//third_party/harfbuzz-ng:harfbuzz-ng-ft",
43 ":freetype",
44 ]
45
46 defines = []
47
48 sources = [
49 "include/freetype-custom-config/ftmodule.h",
50 "include/freetype-custom-config/ftoption.h",
51 "src/src/base/ftbase.c",
52 "src/src/base/ftbitmap.c",
53 "src/src/base/ftsystem.c",
54 ]
55
56 if (is_mac && !is_component_build) {
57 defines += [ "MAC_RESTRICT_VISIBILITY" ]
58 }
59
60 defines += [
61 "FT2_BUILD_LIBRARY",
62 "DARWIN_NO_CARBON",
63
64 # Long directory name to avoid accidentally using wrong headers.
65 # GN currently does not escape '<' and '>' when generating xml based Visual
66 # Studio project files. As a result, use quotes instead of pointy brackets
67 # in these defines.
68 "FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"",
69 "FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"",
70 ]
71
72 if (is_win && is_component_build) {
73 # Used for managing declspec(dllimport/export) visibility.
74 defines += [ "FT2_BUILD_DLL" ]
75 }
76
77 public_configs = [ ":freetype_config" ]
78 configs -= [ "//build/config/compiler:chromium_code" ]
79 configs += [ "//build/config/compiler:no_chromium_code" ]
80
81 configs += [ ":freetype-warnings" ]
82 }
83
84 component("freetype") { 31 component("freetype") {
85 if (is_linux) { 32 if (is_linux) {
86 output_name = "freetype" 33 output_name = "freetype"
87 output_extension = "so.6" 34 output_extension = "so.6"
88 } 35 }
89 36
90 defines = [] 37 defines = []
91 38
92 sources = [ 39 sources = [
93 "include/freetype-custom-config/ftmodule.h", 40 "include/freetype-custom-config/ftmodule.h",
94 "include/freetype-custom-config/ftoption.h", 41 "include/freetype-custom-config/ftoption.h",
95 "src/src/autofit/autofit.c", 42 "src/src/autofit/autofit.c",
43 "src/src/base/ftbase.c",
96 "src/src/base/ftbbox.c", 44 "src/src/base/ftbbox.c",
45 "src/src/base/ftbitmap.c",
97 "src/src/base/ftfntfmt.c", 46 "src/src/base/ftfntfmt.c",
98 "src/src/base/ftfstype.c", 47 "src/src/base/ftfstype.c",
99 "src/src/base/ftgasp.c", 48 "src/src/base/ftgasp.c",
100 "src/src/base/ftglyph.c", 49 "src/src/base/ftglyph.c",
101 "src/src/base/ftinit.c", 50 "src/src/base/ftinit.c",
102 "src/src/base/ftlcdfil.c", 51 "src/src/base/ftlcdfil.c",
103 "src/src/base/ftmm.c", 52 "src/src/base/ftmm.c",
104 "src/src/base/ftstroke.c", 53 "src/src/base/ftstroke.c",
54 "src/src/base/ftsystem.c",
105 "src/src/base/fttype1.c", 55 "src/src/base/fttype1.c",
106 "src/src/cff/cff.c", 56 "src/src/cff/cff.c",
107 "src/src/gzip/ftgzip.c", 57 "src/src/gzip/ftgzip.c",
108 "src/src/pshinter/pshinter.c", 58 "src/src/pshinter/pshinter.c",
109 "src/src/psnames/psnames.c", 59 "src/src/psnames/psnames.c",
110 "src/src/raster/raster.c", 60 "src/src/raster/raster.c",
111 "src/src/sfnt/sfnt.c", 61 "src/src/sfnt/sfnt.c",
112 "src/src/smooth/smooth.c", 62 "src/src/smooth/smooth.c",
113 "src/src/truetype/truetype.c", 63 "src/src/truetype/truetype.c",
114 ] 64 ]
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 "DARWIN_NO_CARBON", 96 "DARWIN_NO_CARBON",
147 97
148 # Long directory name to avoid accidentally using wrong headers. 98 # Long directory name to avoid accidentally using wrong headers.
149 # GN currently does not escape '<' and '>' when generating xml based Visual 99 # GN currently does not escape '<' and '>' when generating xml based Visual
150 # Studio project files. As a result, use quotes instead of pointy brackets 100 # Studio project files. As a result, use quotes instead of pointy brackets
151 # in these defines. 101 # in these defines.
152 "FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"", 102 "FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"",
153 "FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"", 103 "FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"",
154 ] 104 ]
155 105
156 if (!use_system_harfbuzz) {
157 defines += [ "HAVE_HARFBUZZ_FT" ]
158 }
159
160 if (is_win && is_component_build) { 106 if (is_win && is_component_build) {
161 # Used for managing declspec(dllimport/export) visibility. 107 # Used for managing declspec(dllimport/export) visibility.
162 defines += [ "FT2_BUILD_DLL" ] 108 defines += [ "FT2_BUILD_DLL" ]
163 } 109 }
164 110
165 public_configs = [ ":freetype_config" ] 111 public_configs = [ ":freetype_config" ]
166 configs -= [ "//build/config/compiler:chromium_code" ] 112 configs -= [ "//build/config/compiler:chromium_code" ]
167 configs += [ "//build/config/compiler:no_chromium_code" ] 113 configs += [ "//build/config/compiler:no_chromium_code" ]
168 114
169 configs += [ ":freetype-warnings" ] 115 configs += [ ":freetype-warnings" ]
170 116
171 deps = [ 117 deps = [
172 "//third_party/libpng", 118 "//third_party/libpng",
173 "//third_party/zlib", 119 "//third_party/zlib",
174 ] 120 ]
175
176 public_deps = [
177 ":bootstrap_freetype_for_harfbuzz",
178 ]
179
180 if (!use_system_harfbuzz) {
181 deps += [
182 "//third_party/harfbuzz-ng:harfbuzz-ng",
183 "//third_party/harfbuzz-ng:harfbuzz-ng-ft",
184 ]
185 }
186 } 121 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/freetype/include/freetype-custom-config/ftoption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698