• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16import("//third_party/flutter/flutter_config.gni")
17
18config("ace_libfreetype2_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "$flutter_root/skia/third_party/freetype2",
22    "$flutter_root/skia/third_party/externals/freetype/include",
23    "$flutter_root/skia/third_party/libpng",
24    "$flutter_root/skia/third_party/externals/libpng",
25  ]
26  cflags = [
27    "-w",
28    "-fstrict-aliasing",
29    "-fdata-sections",
30    "-ffunction-sections",
31    "-gline-tables-only",
32    "-funwind-tables",
33    "-Wno-unused-parameter",
34    "-fvisibility=hidden",
35  ]
36}
37
38ohos_source_set("ace_libfreetype2") {
39  part_name = flutter_part
40  subsystem_name = flutter_subsystem
41  license_file =
42      "$flutter_root/skia/third_party/externals/freetype/docs/LICENSE.TXT"
43  configs = [ ":ace_libfreetype2_config" ]
44  sources = [
45    "$flutter_root/skia/third_party/externals/freetype/src/autofit/autofit.c",
46    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbase.c",
47    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbbox.c",
48    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbitmap.c",
49    "$flutter_root/skia/third_party/externals/freetype/src/base/ftdebug.c",
50    "$flutter_root/skia/third_party/externals/freetype/src/base/ftfstype.c",
51    "$flutter_root/skia/third_party/externals/freetype/src/base/ftgasp.c",
52    "$flutter_root/skia/third_party/externals/freetype/src/base/ftglyph.c",
53    "$flutter_root/skia/third_party/externals/freetype/src/base/ftinit.c",
54    "$flutter_root/skia/third_party/externals/freetype/src/base/ftmm.c",
55    "$flutter_root/skia/third_party/externals/freetype/src/base/ftpatent.c",
56    "$flutter_root/skia/third_party/externals/freetype/src/base/ftstroke.c",
57    "$flutter_root/skia/third_party/externals/freetype/src/base/ftsynth.c",
58    "$flutter_root/skia/third_party/externals/freetype/src/base/ftsystem.c",
59    "$flutter_root/skia/third_party/externals/freetype/src/base/fttype1.c",
60    "$flutter_root/skia/third_party/externals/freetype/src/base/ftwinfnt.c",
61    "$flutter_root/skia/third_party/externals/freetype/src/cff/cff.c",
62    "$flutter_root/skia/third_party/externals/freetype/src/cid/type1cid.c",
63    "$flutter_root/skia/third_party/externals/freetype/src/gzip/ftgzip.c",
64    "$flutter_root/skia/third_party/externals/freetype/src/psaux/psaux.c",
65    "$flutter_root/skia/third_party/externals/freetype/src/pshinter/pshinter.c",
66    "$flutter_root/skia/third_party/externals/freetype/src/psnames/psnames.c",
67    "$flutter_root/skia/third_party/externals/freetype/src/raster/raster.c",
68    "$flutter_root/skia/third_party/externals/freetype/src/sfnt/sfnt.c",
69    "$flutter_root/skia/third_party/externals/freetype/src/smooth/smooth.c",
70    "$flutter_root/skia/third_party/externals/freetype/src/truetype/truetype.c",
71    "$flutter_root/skia/third_party/externals/freetype/src/type1/type1.c",
72  ]
73
74  defines = [
75    "FT2_BUILD_LIBRARY",
76    "FT_CONFIG_MODULES_H=<include/freetype-android/ftmodule.h>",
77    "FT_CONFIG_OPTIONS_H=<include/freetype-android/ftoption.h>",
78    "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) << 24) | ((FREETYPE_MINOR) << 16) | ((FREETYPE_PATCH) << 8))",
79  ]
80}
81