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("//build/ohos.gni") 15 16group("build_module") { 17 deps = [ 18 ":i18n", 19 ":intl", 20 ] 21} 22 23ohos_shared_library("intl") { 24 include_dirs = [ 25 "//base/global/i18n/frameworks/intl/include", 26 "//base/global/i18n/interfaces/js/kits/include", 27 "//base/hiviewdfx/interfaces/native/inner_api/include", 28 "//foundation/arkui/napi/native_engine", 29 "//foundation/arkui/napi/interfaces/kits", 30 "//third_party/node/src", 31 "//third_party/icu/icu4c/source", 32 "//third_party/icu/icu4c/source/common", 33 "//third_party/icu/icu4c/source/i18n", 34 "//third_party/libphonenumber/cpp/src", 35 "//third_party/libphonenumber", 36 "//third_party/protobuf/src", 37 ] 38 39 sources = [ "src/intl_addon.cpp" ] 40 41 deps = [ 42 "//base/global/i18n/frameworks/intl:intl_util", 43 "//foundation/arkui/napi:ace_napi", 44 "//third_party/icu/icu4c:shared_icuuc", 45 ] 46 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 47 relative_install_dir = "module" 48 subsystem_name = "global" 49 part_name = "i18n" 50} 51 52ohos_shared_library("i18n") { 53 include_dirs = [ 54 "//base/global/i18n/frameworks/intl/include", 55 "//base/global/i18n/interfaces/js/kits/include", 56 "//base/hiviewdfx/interfaces/native/inner_api/include", 57 "//foundation/arkui/napi/native_engine", 58 "//foundation/arkui/napi/interfaces/kits", 59 "//third_party/node/src", 60 "//third_party/icu/icu4c/source", 61 "//third_party/icu/icu4c/source/common", 62 "//third_party/icu/icu4c/source/i18n", 63 "//third_party/libphonenumber/cpp/src", 64 "//third_party/libphonenumber", 65 "//third_party/protobuf/src", 66 ] 67 cflags_cc = [ "-frtti" ] 68 remove_configs = [ "//build/config/compiler:no_rtti" ] 69 sources = [ 70 "src/error_util.cpp", 71 "src/i18n_addon.cpp", 72 ] 73 deps = [ 74 "//base/global/i18n/frameworks/intl:intl_util", 75 "//base/global/i18n/frameworks/intl:preferred_language", 76 "//third_party/icu/icu4c:shared_icui18n", 77 "//third_party/icu/icu4c:shared_icuuc", 78 ] 79 external_deps = [ 80 "hiviewdfx_hilog_native:libhilog", 81 "napi:ace_napi", 82 ] 83 relative_install_dir = "module" 84 subsystem_name = "global" 85 part_name = "i18n" 86} 87