1# Copyright (c) 2025 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 ":intl_napi", 20 ":intl_register", 21 ] 22} 23 24config("intl_register_config") { 25 include_dirs = [ "//base/global/i18n/interfaces/js/innerkits/intl/include" ] 26} 27 28ohos_shared_library("intl_register") { 29 branch_protector_ret = "pac_ret" 30 public_configs = [ ":intl_register_config" ] 31 include_dirs = [ "//base/global/i18n/frameworks/intl/include" ] 32 sources = [ "src/replace_intl_module.cpp" ] 33 version_script = "libintl_napi.map" 34 external_deps = [ 35 "hilog:libhilog", 36 "napi:ace_napi", 37 ] 38 install_images = [ system_base_dir ] 39 relative_install_dir = "platformsdk" 40 subsystem_name = "global" 41 innerapi_tags = [ "platformsdk" ] 42 part_name = "i18n" 43} 44 45ohos_shared_library("intl_napi") { 46 branch_protector_ret = "pac_ret" 47 include_dirs = [ 48 "//base/global/i18n/frameworks/intl/include", 49 "//base/global/i18n/interfaces/js/innerkits/intl/include", 50 ] 51 52 sources = [ 53 "src/collator_addon.cpp", 54 "src/displaynames_addon.cpp", 55 "src/error_util.cpp", 56 "src/intl_addon.cpp", 57 "src/intl_date_time_format_addon.cpp", 58 "src/intl_plural_rules_addon.cpp", 59 "src/js_number_format_addon.cpp", 60 "src/js_relative_time_format_addon.cpp", 61 "src/js_utils.cpp", 62 "src/locale_info_addon.cpp", 63 "src/number_format_addon.cpp", 64 ] 65 use_exceptions = true 66 version_script = "libintl_napi.map" 67 deps = [ "//base/global/i18n/frameworks/intl:intl_util" ] 68 external_deps = [ 69 "common_event_service:cesfwk_innerkits", 70 "hilog:libhilog", 71 "icu:shared_icuuc", 72 "icu:shared_icui18n", 73 "libphonenumber:phonenumber_standard", 74 "napi:ace_napi", 75 ] 76 install_images = [ system_base_dir ] 77 relative_install_dir = "platformsdk" 78 subsystem_name = "global" 79 innerapi_tags = [ "platformsdk" ] 80 part_name = "i18n" 81} 82