mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
a0293e9b54
Signed-off-by: houguobiao <houguobiao@huawei.com> Change-Id: I3688e406888c9b4ac55c361ea52734faba475bb3
99 lines
2.4 KiB
Plaintext
99 lines
2.4 KiB
Plaintext
# Copyright (c) 2021 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")
|
|
import("//foundation/arkui/ace_engine/ace_config.gni")
|
|
|
|
config("ace_base_i18n_config") {
|
|
defines = [ "ACEL10N" ]
|
|
}
|
|
|
|
template("ace_base_i18n") {
|
|
forward_variables_from(invoker, "*")
|
|
ohos_source_set(target_name) {
|
|
defines += invoker.defines
|
|
cflags_cc += invoker.cflags_cc
|
|
if (current_os == "ohos") {
|
|
sanitize = {
|
|
integer_overflow = true
|
|
boundary_sanitize = true
|
|
debug = ace_sanitize_debug
|
|
}
|
|
}
|
|
configs = [
|
|
":ace_base_i18n_config",
|
|
"$ace_root:ace_config",
|
|
]
|
|
deps = [ "$ace_root/frameworks/base/resource:ace_resource" ]
|
|
external_deps = []
|
|
|
|
if (defined(config.use_external_icu) &&
|
|
config.use_external_icu == "static") {
|
|
if (is_arkui_x) {
|
|
deps += [
|
|
"//third_party/icu/icu4c:static_icui18n",
|
|
"//third_party/icu/icu4c:static_icuuc",
|
|
]
|
|
} else {
|
|
external_deps += [
|
|
"icu:static_icui18n",
|
|
"icu:static_icuuc",
|
|
]
|
|
}
|
|
} else {
|
|
external_deps += [
|
|
"icu:shared_icui18n",
|
|
"icu:shared_icuuc",
|
|
]
|
|
}
|
|
|
|
if (!is_arkui_x) {
|
|
external_deps += [ "i18n:intl_util" ]
|
|
}
|
|
|
|
# add base source file here
|
|
sources = [
|
|
"date_time_sequence.cpp",
|
|
"localization.cpp",
|
|
]
|
|
|
|
if (use_hilog) {
|
|
external_deps += [ "hilog:libhilog" ]
|
|
}
|
|
|
|
subsystem_name = ace_engine_subsystem
|
|
part_name = ace_engine_part
|
|
}
|
|
}
|
|
|
|
foreach(item, ace_platforms) {
|
|
ace_base_i18n("ace_base_i18n_" + item.name) {
|
|
defines = []
|
|
cflags_cc = []
|
|
config = {
|
|
}
|
|
|
|
if (defined(item.config)) {
|
|
config = item.config
|
|
}
|
|
|
|
if (defined(config.defines)) {
|
|
defines = config.defines
|
|
}
|
|
|
|
if (defined(config.cflags_cc)) {
|
|
cflags_cc = config.cflags_cc
|
|
}
|
|
}
|
|
}
|