代码拉取完成,页面将自动刷新
# 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/templates/common/copy.gni")
template("ohos_prebuilt_executable") {
assert(defined(invoker.source), "source must be defined for ${target_name}.")
if (defined(invoker.output)) {
_copy_output = "${target_out_dir}/${invoker.output}"
} else {
_copy_output = "${target_out_dir}/${invoker.source}"
}
ohos_copy(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
"deps",
"public_configs",
"subsystem_name",
"part_name",
# For generate_module_info
"install_images",
"module_install_dir",
"relative_install_dir",
"symlink_target_name",
# Open source license related
"license_file",
"license_as_sources",
])
set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "bin"
prebuilt = true
install_enable = false
enable_strip = false
if (defined(invoker.enable_strip) && invoker.enable_strip) {
enable_strip = true
}
if (defined(invoker.install_enable)) {
install_enable = invoker.install_enable
}
}
}
template("ohos_prebuilt_shared_library") {
assert(defined(invoker.source), "source must be defined for ${target_name}.")
if (defined(invoker.output)) {
_copy_output = "${target_out_dir}/${invoker.output}"
} else {
_copy_output = "${target_out_dir}/${invoker.source}"
}
config("${target_name}__config") {
libs = [ _copy_output ]
}
ohos_copy(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
"deps",
"public_configs",
"subsystem_name",
"part_name",
# For generate_module_info
"install_images",
"module_install_dir",
"relative_install_dir",
"symlink_target_name",
# Open source license related
"license_file",
"license_as_sources",
])
set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "lib"
prebuilt = true
install_enable = true
enable_strip = false
if (defined(invoker.enable_strip) && invoker.enable_strip) {
enable_strip = true
}
if (defined(invoker.install_enable)) {
install_enable = invoker.install_enable
}
if (!defined(public_configs)) {
public_configs = []
}
public_configs += [ ":${target_name}__config" ]
}
}
template("ohos_prebuilt_static_library") {
assert(defined(invoker.source), "source must be defined for ${target_name}.")
if (defined(invoker.output)) {
_copy_output = "${target_out_dir}/${invoker.output}"
} else {
_copy_output = "${target_out_dir}/${invoker.source}"
}
config("${target_name}__config") {
libs = [ _copy_output ]
}
ohos_copy(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
"deps",
"public_configs",
"subsystem_name",
"part_name",
# Open source license related
"license_file",
"license_as_sources",
])
set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
bypass_module_info_generation = true
if (!defined(public_configs)) {
public_configs = []
}
public_configs += [ ":${target_name}__config" ]
}
}
template("ohos_prebuilt_etc") {
assert(defined(invoker.source), "source must be defined for ${target_name}.")
if (defined(invoker.output)) {
_copy_output = "${target_out_dir}/${invoker.output}"
} else {
_copy_output = "${target_out_dir}/${invoker.source}"
}
ohos_copy(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
"deps",
"public_configs",
"subsystem_name",
"part_name",
# For generate_module_info
"install_images",
"module_install_dir",
"relative_install_dir",
"symlink_target_name",
# Open source license related
"license_file",
"license_as_sources",
])
set_sources_assignment_filter([])
sources = [ invoker.source ]
outputs = [ _copy_output ]
module_type = "etc"
prebuilt = true
install_enable = true
if (defined(invoker.install_enable)) {
install_enable = invoker.install_enable
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。