• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.. All rights reserved.
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/frameworks/text/config.gni")
16import("//foundation/graphic/graphic_2d/graphic_config.gni")
17
18config("rosen_text_public_config") {
19  include_dirs = [
20    "$rosen_text_root/interface/export",
21    "$graphic_2d_root/rosen/modules/2d_graphics/include",
22    "$graphic_2d_root/rosen/modules/2d_graphics/src",
23    "$graphic_2d_root/rosen/modules/2d_graphics/src/drawing",
24    "$graphic_2d_root/rosen/modules/2d_graphics/src/drawing/engine_adapter",
25    "$graphic_2d_root/rosen/modules",
26    "$graphic_2d_root/rosen/modules/render_service_client",
27    "$graphic_2d_root/rosen/modules/render_service_client/core",
28    "$graphic_2d_root/rosen/modules/render_service_base",
29    "$graphic_2d_root/rosen/modules/render_service_base/include",
30    "$graphic_2d_root/rosen/modules/platform/image_native",
31  ]
32}
33
34ohos_source_set("rosen_text_skia") {
35  public_configs = [ ":rosen_text_public_config" ]
36  include_dirs = [
37    ".",
38    "$rosen_text_root/adapter/skia",
39    "$rosen_text_root/adapter/skia/txt/src",
40  ]
41
42  if (is_arkui_x) {
43    include_dirs += [
44      "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter",
45      "//third_party/bounds_checking_function/include",
46    ]
47    defines = [ "CROSS_PLATFORM" ]
48  }
49
50  cflags_cc = [ "-std=c++17" ]
51
52  sources = [
53    "common/hm_symbol_txt.cpp",
54    "common/symbol_gradient.cpp",
55    "common/text_style.cpp",
56    "common/typography_style.cpp",
57    "global_config/text_global_config.cpp",
58    "skia_txt/convert.cpp",
59    "skia_txt/custom_symbol_config.cpp",
60    "skia_txt/default_symbol_config.cpp",
61    "skia_txt/font_collection.cpp",
62    "skia_txt/line_typography.cpp",
63    "skia_txt/run_impl.cpp",
64    "skia_txt/text_line_base.cpp",
65    "skia_txt/typography.cpp",
66    "skia_txt/typography_create.cpp",
67    "text_effect/text_effect_factory_creator.cpp",
68    "text_effect/text_flip_effect.cpp",
69  ]
70
71  external_deps = [
72    "bounds_checking_function:libsec_shared",
73    "hilog:libhilog",
74    "jsoncpp:jsoncpp",
75    "skia:skia_canvaskit",
76  ]
77
78  deps = [
79    "$rosen_text_root/adapter/skia:skia_libtxt_$platform",
80    "texgine:libtexgine_source",
81  ]
82
83  if (platform_is_ohos) {
84    external_deps += [
85      "hitrace:hitrace_meter",
86      "init:libbegetutil",
87    ]
88    defines = [ "ENABLE_OHOS_ENHANCE" ]
89  }
90
91  part_name = "graphic_2d"
92  subsystem_name = "graphic"
93}
94