# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") group("build_module") { deps = [ ":i18n", ":intl", ] } ohos_shared_library("intl") { include_dirs = [ "//base/global/i18n/frameworks/intl/include", "//base/global/i18n/interfaces/js/kits/include", "//base/hiviewdfx/interfaces/native/inner_api/include", "//foundation/arkui/napi/native_engine", "//foundation/arkui/napi/interfaces/kits", "//third_party/node/src", "//third_party/icu/icu4c/source", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/libphonenumber/cpp/src", "//third_party/libphonenumber", "//third_party/protobuf/src", ] sources = [ "src/intl_addon.cpp" ] deps = [ "//base/global/i18n/frameworks/intl:intl_util", "//third_party/icu/icu4c:shared_icuuc", ] external_deps = [ "hilog:libhilog", "napi:ace_napi", ] relative_install_dir = "module" subsystem_name = "global" part_name = "i18n" } ohos_shared_library("i18n") { include_dirs = [ "//base/global/i18n/frameworks/intl/include", "//base/global/i18n/interfaces/js/kits/include", "//base/hiviewdfx/interfaces/native/inner_api/include", "//foundation/arkui/napi/native_engine", "//foundation/arkui/napi/interfaces/kits", "//third_party/node/src", "//third_party/icu/icu4c/source", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/libphonenumber/cpp/src", "//third_party/libphonenumber", "//third_party/protobuf/src", ] cflags_cc = [ "-frtti" ] remove_configs = [ "//build/config/compiler:no_rtti" ] sources = [ "src/error_util.cpp", "src/i18n_addon.cpp", "src/i18n_normalizer_addon.cpp", "src/system_locale_manager_addon.cpp", "src/variable_convertor.cpp", ] deps = [ "//base/global/i18n/frameworks/intl:intl_util", "//base/global/i18n/frameworks/intl:preferred_language", "//third_party/icu/icu4c:shared_icui18n", "//third_party/icu/icu4c:shared_icuuc", "//third_party/libpng:libpng", ] external_deps = [ "hilog:libhilog", "napi:ace_napi", ] relative_install_dir = "module" subsystem_name = "global" part_name = "i18n" }