xref: /base/global/i18n/services/BUILD.gn (revision 9596a2c1)
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")
15
16group("i18n_service_ability") {
17  deps = [
18    ":hmos_cust_libphonenumber_mount",
19    ":hmos_cust_timezone_mount",
20    ":i18n_sa",
21    ":i18n_sa_client",
22    "./etc:i18n_sa_etc",
23    "./etc:prefabrication_libphonenumber",
24    "./etc:prefabrication_timezone",
25    "./etc:version_txt",
26  ]
27}
28
29ohos_shared_library("i18n_sa_client") {
30  sanitize = {
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34  }
35  branch_protector_ret = "pac_ret"
36
37  sources = [
38    "./src/i18n_service_ability_client.cpp",
39    "./src/i18n_service_ability_load_callback.cpp",
40    "./src/i18n_service_ability_load_manager.cpp",
41    "./src/i18n_service_ability_proxy.cpp",
42  ]
43  include_dirs = [
44    "./include",
45    "../frameworks/intl/include",
46  ]
47  deps = []
48  external_deps = [
49    "c_utils:utils",
50    "hilog:libhilog",
51    "ipc:ipc_core",
52    "samgr:samgr_proxy",
53  ]
54  innerapi_tags = [ "platformsdk" ]
55  part_name = "i18n"
56  subsystem_name = "global"
57}
58
59ohos_shared_library("i18n_sa") {
60  sanitize = {
61    cfi = true
62    cfi_cross_dso = true
63    debug = false
64  }
65  branch_protector_ret = "pac_ret"
66
67  sources = [
68    "./src/i18n_service_ability.cpp",
69    "./src/i18n_service_ability_stub.cpp",
70    "./src/i18n_service_event.cpp",
71  ]
72  include_dirs = [
73    "./include",
74    "../frameworks/intl/include",
75    "../interfaces/native/inner_api/preferred_language/include",
76  ]
77  deps = [
78    ":i18n_sa_client",
79    "../frameworks/intl:intl_util",
80    "../frameworks/intl:preferred_language",
81  ]
82  if (target_platform == "pc") {
83    defines = [ "SUPPORT_MULTI_USER" ]
84  }
85  external_deps = [
86    "ability_base:want",
87    "ability_runtime:ability_manager",
88    "access_token:libaccesstoken_sdk",
89    "access_token:libtokenid_sdk",
90    "c_utils:utils",
91    "eventhandler:libeventhandler",
92    "hilog:libhilog",
93    "ipc:ipc_core",
94    "memmgr:memmgrclient",
95    "openssl:libcrypto_shared",
96    "openssl:libssl_shared",
97    "preferences:native_preferences",
98    "safwk:system_ability_fwk",
99    "samgr:samgr_proxy",
100  ]
101  part_name = "i18n"
102  subsystem_name = "global"
103}
104
105ohos_executable("hmos_cust_timezone_mount") {
106  sources = [ "src/hmos_timezone_mount.cpp" ]
107
108  include_dirs = [ "../frameworks/intl/include" ]
109  deps = [ "../frameworks/intl:intl_util" ]
110  external_deps = [
111    "hilog:libhilog",
112    "init:libbegetutil",
113    "openssl:libcrypto_shared",
114    "openssl:libssl_shared",
115  ]
116  install_images = [ "system" ]
117  part_name = "i18n"
118  subsystem_name = "global"
119}
120
121ohos_executable("hmos_cust_libphonenumber_mount") {
122  sources = [ "src/hmos_libphonenumber_mount.cpp" ]
123
124  include_dirs = [ "../frameworks/intl/include" ]
125  deps = [ "../frameworks/intl:intl_util" ]
126  external_deps = [
127    "hilog:libhilog",
128    "openssl:libcrypto_shared",
129    "openssl:libssl_shared",
130  ]
131  install_images = [ "system" ]
132  part_name = "i18n"
133  subsystem_name = "global"
134}
135