• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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("//base/global/i18n/i18n.gni")
15import("//build/ohos.gni")
16
17group("build_module") {
18  deps = [
19    ":i18n",
20    ":intl",
21  ]
22}
23
24ohos_shared_library("intl") {
25  include_dirs = [
26    "//base/global/i18n/frameworks/intl/include",
27    "//base/global/i18n/interfaces/js/kits/include",
28  ]
29
30  sources = [
31    "src/intl_addon.cpp",
32    "src/js_utils.cpp",
33    "src/locale_info_addon.cpp",
34    "src/number_format_addon.cpp",
35  ]
36
37  deps = [ "//base/global/i18n/frameworks/intl:intl_util" ]
38  external_deps = [
39    "common_event_service:cesfwk_innerkits",
40    "hilog:libhilog",
41    "icu:shared_icuuc",
42    "libphonenumber:phonenumber_standard",
43    "napi:ace_napi",
44  ]
45  relative_install_dir = "module"
46  subsystem_name = "global"
47  part_name = "i18n"
48}
49
50ohos_shared_library("i18n") {
51  include_dirs = [
52    "//base/global/i18n/frameworks/intl/include",
53    "//base/global/i18n/interfaces/js/kits/include",
54    "//base/global/i18n/interfaces/native/inner_api/i18n/include",
55    "//base/global/i18n/services/include",
56  ]
57  cflags_cc = [ "-frtti" ]
58  remove_configs = [ "//build/config/compiler:no_rtti" ]
59  sources = [
60    "src/api_version.cpp",
61    "src/entity_recognizer_addon.cpp",
62    "src/error_util.cpp",
63    "src/holiday_manager_addon.cpp",
64    "src/i18n_addon.cpp",
65    "src/i18n_calendar_addon.cpp",
66    "src/i18n_normalizer_addon.cpp",
67    "src/i18n_system_addon.cpp",
68    "src/i18n_timezone_addon.cpp",
69    "src/i18n_unicode_addon.cpp",
70    "src/js_utils.cpp",
71    "src/locale_info_addon.cpp",
72    "src/number_format_addon.cpp",
73    "src/simple_date_time_format_addon.cpp",
74    "src/simple_number_format_addon.cpp",
75    "src/styled_number_format_addon.cpp",
76    "src/system_locale_manager_addon.cpp",
77    "src/variable_convertor.cpp",
78  ]
79  deps = [
80    "//base/global/i18n/frameworks/intl:intl_util",
81    "//base/global/i18n/frameworks/intl:preferred_language",
82    "//base/global/i18n/services:i18n_sa_client",
83  ]
84  external_deps = [
85    "bundle_framework:appexecfwk_base",
86    "bundle_framework:appexecfwk_core",
87    "c_utils:utils",
88    "common_event_service:cesfwk_innerkits",
89    "hilog:libhilog",
90    "icu:shared_icui18n",
91    "icu:shared_icuuc",
92    "ipc:ipc_core",
93    "libphonenumber:phonenumber_standard",
94    "libpng:libpng",
95    "libxml2:libxml2",
96    "napi:ace_napi",
97    "preferences:native_preferences",
98    "samgr:samgr_proxy",
99  ]
100
101  defines = []
102  if (i18n_support_app_preferred_language) {
103    defines += [ "SUPPORT_APP_PREFERRED_LANGUAGE" ]
104  }
105  if (i18n_support_ui) {
106    external_deps += [ "ability_base:configuration" ]
107    defines += [ "SUPPORT_GRAPHICS" ]
108  }
109  relative_install_dir = "module"
110  subsystem_name = "global"
111  part_name = "i18n"
112}
113