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 = [ ":cj_i18n_ffi" ] 19} 20 21ohos_shared_library("cj_i18n_ffi") { 22 include_dirs = [ 23 "../../frameworks/intl/include", 24 "../js/kits/include", 25 ] 26 27 cflags_cc = [ "-frtti" ] 28 remove_configs = [ "//build/config/compiler:no_rtti" ] 29 30 if (!defined(defines)) { 31 defines = [] 32 } 33 34 if (!build_ohos_sdk) { 35 deps = [ "../../frameworks/intl:preferred_language" ] 36 external_deps = [ 37 "c_utils:utils", 38 "hilog:libhilog", 39 "icu:shared_icui18n", 40 "icu:shared_icuuc", 41 "napi:ace_napi", 42 "napi:cj_bind_ffi", 43 "napi:cj_bind_native", 44 ] 45 sources = [ "i18n_ffi.cpp" ] 46 } else { 47 defines += [ "PREVIEWER" ] 48 sources = [ "cj_i18n_mock.cpp" ] 49 external_deps = [ "napi:cj_bind_ffi" ] 50 } 51 52 if (current_os == "ohos") { 53 defines += [ "OHOS_PLATFORM" ] 54 } 55 56 if (current_os == "mingw") { 57 defines += [ "WINDOWS_PLATFORM" ] 58 } 59 60 innerapi_tags = [ "platformsdk" ] 61 subsystem_name = "global" 62 part_name = "i18n" 63} 64