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("//base/global/i18n/i18n.gni") 15import("//build/ohos.gni") 16 17group("build_module") { 18 deps = [ 19 ":cj_i18n_ffi", 20 "intl:cj_intl_ffi", 21 ] 22} 23 24ohos_shared_library("cj_i18n_ffi") { 25 include_dirs = [ 26 "../../frameworks/intl/include", 27 "include", 28 ] 29 30 if (!defined(defines)) { 31 defines = [] 32 } 33 34 deps = [ 35 "../../frameworks/intl:intl_util", 36 "../../frameworks/intl:preferred_language", 37 ] 38 39 external_deps = [ 40 "c_utils:utils", 41 "common_event_service:cesfwk_innerkits", 42 "hilog:libhilog", 43 "icu:shared_icui18n", 44 "icu:shared_icuuc", 45 "ipc:ipc_core", 46 "libphonenumber:phonenumber_standard", 47 "libpng:libpng", 48 "libxml2:libxml2", 49 "napi:ace_napi", 50 "napi:cj_bind_ffi", 51 "napi:cj_bind_native", 52 "preferences:native_preferences", 53 "samgr:samgr_proxy", 54 ] 55 56 sources = [ 57 "src/i18n_breakIterator_ffi.cpp", 58 "src/i18n_breakIterator_impl.cpp", 59 "src/i18n_calendar_ffi.cpp", 60 "src/i18n_calendar_impl.cpp", 61 "src/i18n_entity_ffi.cpp", 62 "src/i18n_entity_impl.cpp", 63 "src/i18n_ffi.cpp", 64 "src/i18n_holiday_ffi.cpp", 65 "src/i18n_holiday_impl.cpp", 66 "src/i18n_index_util_ffi.cpp", 67 "src/i18n_index_util_impl.cpp", 68 "src/i18n_normalizer_ffi.cpp", 69 "src/i18n_normalizer_impl.cpp", 70 "src/i18n_phone_number_format_ffi.cpp", 71 "src/i18n_phone_number_format_impl.cpp", 72 "src/i18n_system_ffi.cpp", 73 "src/i18n_timezone_ffi.cpp", 74 "src/i18n_timezone_impl.cpp", 75 "src/i18n_transliterator_ffi.cpp", 76 "src/i18n_transliterator_impl.cpp", 77 "src/i18n_unicode_ffi.cpp", 78 "src/i18n_util_ffi.cpp", 79 ] 80 81 if (current_os == "ohos") { 82 defines += [ "OHOS_PLATFORM" ] 83 } 84 85 if (current_os == "mingw") { 86 defines += [ "WINDOWS_PLATFORM" ] 87 } 88 89 if (i18n_support_app_preferred_language) { 90 defines += [ "SUPPORT_APP_PREFERRED_LANGUAGE" ] 91 } 92 93 innerapi_tags = [ "platformsdk" ] 94 subsystem_name = "global" 95 part_name = "i18n" 96} 97