• 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    "-Os",
30    "-fdata-sections",
31    "-ffunction-sections",
32    "-gline-tables-only",
33    "-funwind-tables",
34    "-Wno-unused-parameter",
35    "-fvisibility=hidden",
36  ]
37}
38
39ohos_source_set("ace_libfreetype2") {
40  part_name = flutter_part
41  subsystem_name = flutter_subsystem
42  license_file =
43      "$flutter_root/skia/third_party/externals/freetype/docs/LICENSE.TXT"
44  configs = [ ":ace_libfreetype2_config" ]
45  sources = [
46    "$flutter_root/skia/third_party/externals/freetype/src/autofit/autofit.c",
47    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbase.c",
48    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbbox.c",
49    "$flutter_root/skia/third_party/externals/freetype/src/base/ftbitmap.c",
50    "$flutter_root/skia/third_party/externals/freetype/src/base/ftdebug.c",
51    "$flutter_root/skia/third_party/externals/freetype/src/base/ftfstype.c",
52    "$flutter_root/skia/third_party/externals/freetype/src/base/ftgasp.c",
53    "$flutter_root/skia/third_party/externals/freetype/src/base/ftglyph.c",
54    "$flutter_root/skia/third_party/externals/freetype/src/base/ftinit.c",
55    "$flutter_root/skia/third_party/externals/freetype/src/base/ftmm.c",
56    "$flutter_root/skia/third_party/externals/freetype/src/base/ftpatent.c",
57    "$flutter_root/skia/third_party/externals/freetype/src/base/ftstroke.c",
58    "$flutter_root/skia/third_party/externals/freetype/src/base/ftsynth.c",
59    "$flutter_root/skia/third_party/externals/freetype/src/base/ftsystem.c",
60    "$flutter_root/skia/third_party/externals/freetype/src/base/fttype1.c",
61    "$flutter_root/skia/third_party/externals/freetype/src/base/ftwinfnt.c",
62    "$flutter_root/skia/third_party/externals/freetype/src/cff/cff.c",
63    "$flutter_root/skia/third_party/externals/freetype/src/cid/type1cid.c",
64    "$flutter_root/skia/third_party/externals/freetype/src/gzip/ftgzip.c",
65    "$flutter_root/skia/third_party/externals/freetype/src/psaux/psaux.c",
66    "$flutter_root/skia/third_party/externals/freetype/src/pshinter/pshinter.c",
67    "$flutter_root/skia/third_party/externals/freetype/src/psnames/psnames.c",
68    "$flutter_root/skia/third_party/externals/freetype/src/raster/raster.c",
69    "$flutter_root/skia/third_party/externals/freetype/src/sfnt/sfnt.c",
70    "$flutter_root/skia/third_party/externals/freetype/src/smooth/smooth.c",
71    "$flutter_root/skia/third_party/externals/freetype/src/truetype/truetype.c",
72    "$flutter_root/skia/third_party/externals/freetype/src/type1/type1.c",
73  ]
74
75  defines = [
76    "FT2_BUILD_LIBRARY",
77    "FT_CONFIG_MODULES_H=<include/freetype-android/ftmodule.h>",
78    "FT_CONFIG_OPTIONS_H=<include/freetype-android/ftoption.h>",
79    "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) << 24) | ((FREETYPE_MINOR) << 16) | ((FREETYPE_PATCH) << 8))",
80  ]
81}
82