• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../frameworks/fontmgr/fontmgr.gni")
16import("//build/config/components/idl_tool/idl.gni")
17
18idl_gen_interface("font_service_interface") {
19  sources = [ "IFontService.idl" ]
20  log_domainid = "0xD001E00"
21  log_tag = "FONT_MSG"
22}
23
24config("font_client_config") {
25  include_dirs = [
26    "include",
27    "${target_gen_dir}",
28  ]
29}
30
31group("font_service_ability") {
32  deps = [
33    ":font_manager_server",
34    ":font_manager_client",
35    "./etc:font_sa_etc",
36  ]
37}
38
39ohos_shared_library("font_manager_client") {
40  output_values = get_target_outputs(":font_service_interface")
41  sources = [
42    "src/font_manager_client.cpp",
43    "src/font_service_load_manager.cpp",
44    "src/font_sa_load_callback.cpp",
45  ]
46
47  sources += filter_include(output_values, [ "*_proxy.cpp" ])
48  public_configs = [ ":font_client_config" ]
49
50  include_dirs = fontmgr_include
51
52  deps = [ ":font_service_interface" ]
53
54  external_deps = [
55    "c_utils:utils",
56    "hilog:libhilog",
57    "hitrace:hitrace_meter",
58    "ipc:ipc_core",
59    "samgr:samgr_proxy",
60  ]
61  version_script = "font_manager_client.map"
62
63  branch_protector_ret = "pac_ret"
64
65  cflags_cc = [
66    "-fdata-sections",
67    "-ffunction-sections",
68    "-fno-asynchronous-unwind-tables",
69    "-fno-unwind-tables",
70    "-Os",
71  ]
72
73  part_name = "font_manager"
74  subsystem_name = "global"
75}
76
77ohos_shared_library("font_manager_server") {
78  shlib_type = "sa"
79  output_values = get_target_outputs(":font_service_interface")
80  sources = [ "src/font_manager_server.cpp" ]
81  sources += filter_include(output_values, [ "*_stub.cpp" ])
82  sources += fontmgr_src
83
84  include_dirs = [
85    "include",
86    "${target_gen_dir}",
87  ]
88
89  include_dirs += fontmgr_include
90
91  deps = [
92    ":font_manager_client",
93    ":font_service_interface",
94  ]
95
96  external_deps = [
97    "ability_runtime:ability_manager",
98    "access_token:libaccesstoken_sdk",
99    "access_token:libtokenid_sdk",
100    "c_utils:utils",
101    "eventhandler:libeventhandler",
102    "hilog:libhilog",
103    "hisysevent:libhisysevent",
104    "ipc:ipc_core",
105    "safwk:system_ability_fwk",
106    "samgr:samgr_proxy",
107  ]
108
109  external_deps += fontmgr_external_deps
110
111  branch_protector_ret = "pac_ret"
112  sanitize = {
113    boundary_sanitize = true
114    cfi = true
115    cfi_cross_dso = true
116    debug = false
117    integer_overflow = true
118    ubsan = true
119  }
120
121  cflags_cc = [
122    "-fdata-sections",
123    "-ffunction-sections",
124    "-fno-asynchronous-unwind-tables",
125    "-fno-unwind-tables",
126    "-Os",
127  ]
128
129  part_name = "font_manager"
130  subsystem_name = "global"
131}
132