• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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/graphic/graphic_2d/graphic_config.gni")
16
17is_ok = true
18
19## Build libtexgine.so {{{
20config("libtexgine_config") {
21  visibility = [ ":libtexgine" ]
22
23  cflags = [
24    "-Wall",
25    "-Werror",
26    "-g3",
27  ]
28
29  defines = [
30    "LOGGER_ENABLE_SCOPE",
31    "TEXGINE_ENABLE_DEBUGLOG",
32  ]
33
34  include_dirs = [
35    "src",
36    "export",
37  ]
38}
39
40config("libtexgine_public_config") {
41  include_dirs = [
42    "export",
43    "texgine_drawing",
44    "//third_party/skia/third_party/externals/harfbuzz/src",
45  ]
46}
47
48ohos_shared_library("libtexgine") {
49  if (is_ok) {
50    sources = [
51      "src/bidi_processer.cpp",
52      "src/char_groups.cpp",
53      "src/dynamic_file_font_provider.cpp",
54      "src/dynamic_font_provider.cpp",
55      "src/dynamic_font_style_set.cpp",
56      "src/font_collection.cpp",
57      "src/font_config.cpp",
58      "src/font_manager.cpp",
59      "src/font_parser.cpp",
60      "src/font_providers.cpp",
61      "src/font_styles.cpp",
62      "src/init.cpp",
63      "src/line_breaker.cpp",
64      "src/measurer.cpp",
65      "src/measurer_impl.cpp",
66      "src/mock.cpp",
67      "src/opentype_parser/cmap_parser.cpp",
68      "src/opentype_parser/cmap_table_parser.cpp",
69      "src/opentype_parser/name_table_parser.cpp",
70      "src/opentype_parser/opentype_basic_type.cpp",
71      "src/opentype_parser/post_table_parser.cpp",
72      "src/opentype_parser/ranges.cpp",
73      "src/shaper.cpp",
74      "src/system_font_provider.cpp",
75      "src/texgine_exception.cpp",
76      "src/text_breaker.cpp",
77      "src/text_converter.cpp",
78      "src/text_merger.cpp",
79      "src/text_reverser.cpp",
80      "src/text_shaper.cpp",
81      "src/text_span.cpp",
82      "src/text_style.cpp",
83      "src/typeface.cpp",
84      "src/typography_builder_impl.cpp",
85      "src/typography_impl.cpp",
86      "src/typography_style.cpp",
87      "src/typography_types.cpp",
88      "src/utils/exlog.cpp",
89      "src/utils/logger.cpp",
90      "src/utils/memory_reporter.cpp",
91      "src/utils/trace_ohos.cpp",
92      "src/variant_font_style_set.cpp",
93      "src/variant_span.cpp",
94      "src/word_breaker.cpp",
95    ]
96
97    configs = [
98      ":libtexgine_config",
99      "//build/config/compiler:exceptions",
100    ]
101
102    public_configs = [ ":libtexgine_public_config" ]
103
104    platform = current_os
105    if (platform == "mingw") {
106      platform = "windows"
107    }
108
109    public_deps = [
110      "$graphic_2d_root/rosen/build/flutter/icu:rosen_libicu_$platform",
111      "texgine_drawing:libtexgine_drawing",
112      "//third_party/jsoncpp:jsoncpp",
113    ]
114
115    external_deps = [
116      "c_utils:utils",
117      "hilog:libhilog",
118      "hitrace:hitrace_meter",
119    ]
120  }
121
122  part_name = "graphic_2d"
123  subsystem_name = "graphic"
124}
125## Build libtexgine.so }}}
126