# Copyright (c) 2024 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("//base/global/i18n/i18n.gni") import("//build/ohos.gni") group("build_module") { deps = [ ":cj_i18n_ffi" ] } ohos_shared_library("cj_i18n_ffi") { include_dirs = [ "../../frameworks/intl/include", "../js/kits/include", ] cflags_cc = [ "-frtti" ] remove_configs = [ "//build/config/compiler:no_rtti" ] if (!defined(defines)) { defines = [] } if (!build_ohos_sdk) { deps = [ "../../frameworks/intl:preferred_language" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "icu:shared_icui18n", "icu:shared_icuuc", "napi:ace_napi", "napi:cj_bind_ffi", "napi:cj_bind_native", ] sources = [ "i18n_ffi.cpp" ] } else { defines += [ "PREVIEWER" ] sources = [ "cj_i18n_mock.cpp" ] external_deps = [ "napi:cj_bind_ffi" ] } if (current_os == "ohos") { defines += [ "OHOS_PLATFORM" ] } if (current_os == "mingw") { defines += [ "WINDOWS_PLATFORM" ] } innerapi_tags = [ "platformsdk" ] subsystem_name = "global" part_name = "i18n" }