• 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/innerkits/intl/include",
28  ]
29
30  sources = [ "src/intl_module.cpp" ]
31  deps = [ "//base/global/i18n/interfaces/js/innerkits/intl:intl_napi" ]
32  external_deps = [ "napi:ace_napi" ]
33  relative_install_dir = "module"
34  subsystem_name = "global"
35  part_name = "i18n"
36}
37
38ohos_shared_library("i18n") {
39  include_dirs = [
40    "//base/global/i18n/frameworks/intl/include",
41    "//base/global/i18n/interfaces/js/innerkits/intl/include",
42    "//base/global/i18n/interfaces/js/kits/include",
43    "//base/global/i18n/interfaces/native/inner_api/i18n/include",
44    "//base/global/i18n/services/include",
45  ]
46  use_exceptions = true
47  cflags_cc = [ "-frtti" ]
48  remove_configs = [ "//build/config/compiler:no_rtti" ]
49  sources = [
50    "src/api_version.cpp",
51    "src/entity_recognizer_addon.cpp",
52    "src/holiday_manager_addon.cpp",
53    "src/i18n_addon.cpp",
54    "src/i18n_calendar_addon.cpp",
55    "src/i18n_normalizer_addon.cpp",
56    "src/i18n_system_addon.cpp",
57    "src/i18n_timezone_addon.cpp",
58    "src/i18n_unicode_addon.cpp",
59    "src/simple_date_time_format_addon.cpp",
60    "src/simple_number_format_addon.cpp",
61    "src/styled_number_format_addon.cpp",
62    "src/system_locale_manager_addon.cpp",
63    "src/variable_convertor.cpp",
64    "src/zone_offset_transition_addon.cpp",
65    "src/zone_rules_addon.cpp",
66  ]
67  deps = [
68    "//base/global/i18n/frameworks/intl:intl_util",
69    "//base/global/i18n/frameworks/intl:preferred_language",
70    "//base/global/i18n/interfaces/js/innerkits/intl:intl_napi",
71    "//base/global/i18n/services:i18n_sa_client",
72  ]
73  external_deps = [
74    "bundle_framework:appexecfwk_base",
75    "bundle_framework:appexecfwk_core",
76    "c_utils:utils",
77    "common_event_service:cesfwk_innerkits",
78    "hilog:libhilog",
79    "icu:shared_icui18n",
80    "icu:shared_icuuc",
81    "ipc:ipc_core",
82    "libphonenumber:phonenumber_standard",
83    "libpng:libpng",
84    "libxml2:libxml2",
85    "napi:ace_napi",
86    "preferences:native_preferences",
87    "samgr:samgr_proxy",
88  ]
89
90  defines = []
91  if (i18n_support_app_preferred_language) {
92    defines += [ "SUPPORT_APP_PREFERRED_LANGUAGE" ]
93  }
94  if (i18n_support_ui) {
95    external_deps += [ "ability_base:configuration" ]
96    defines += [ "SUPPORT_GRAPHICS" ]
97  }
98  relative_install_dir = "module"
99  subsystem_name = "global"
100  part_name = "i18n"
101}
102