代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_libpng 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
import("//build/ohos.gni")
action("libpng_action") {
script = "//third_party/libpng/install.py"
outputs = [
"${target_gen_dir}/libpng-1.6.38/png.c",
"${target_gen_dir}/libpng-1.6.38/pngerror.c",
"${target_gen_dir}/libpng-1.6.38/pngget.c",
"${target_gen_dir}/libpng-1.6.38/pngmem.c",
"${target_gen_dir}/libpng-1.6.38/pngpread.c",
"${target_gen_dir}/libpng-1.6.38/pngread.c",
"${target_gen_dir}/libpng-1.6.38/pngrio.c",
"${target_gen_dir}/libpng-1.6.38/pngrtran.c",
"${target_gen_dir}/libpng-1.6.38/pngrutil.c",
"${target_gen_dir}/libpng-1.6.38/pngset.c",
"${target_gen_dir}/libpng-1.6.38/pngtrans.c",
"${target_gen_dir}/libpng-1.6.38/pngwio.c",
"${target_gen_dir}/libpng-1.6.38/pngwrite.c",
"${target_gen_dir}/libpng-1.6.38/pngwtran.c",
"${target_gen_dir}/libpng-1.6.38/pngwutil.c",
"${target_gen_dir}/libpng-1.6.38/arm/arm_init.c",
"${target_gen_dir}/libpng-1.6.38/arm/filter_neon_intrinsics.c",
"${target_gen_dir}/libpng-1.6.38/arm/palette_neon_intrinsics.c",
]
inputs = [ "//third_party/libpng/libpng-1.6.38.tar.gz" ]
libpng_path = rebase_path("${target_gen_dir}", root_build_dir)
libpng_source_path = rebase_path("//third_party/libpng", root_build_dir)
args = [
"--gen-dir",
"$libpng_path",
"--source-dir",
"$libpng_source_path",
]
}
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
config("libpng_config") {
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
}
libpng_source = get_target_outputs(":libpng_action")
lite_library("libpng") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
deps = [ "//build/lite/config/component/zlib:zlib_static" ]
} else {
target_type = "shared_library"
deps = [ "//build/lite/config/component/zlib:zlib_shared" ]
}
deps += [ ":libpng_action" ]
if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
cflags = [
"--diag_suppress",
"Pa082,Pa084",
]
cflags_cc = cflags
}
sources = libpng_source
public_configs = [ ":libpng_config" ]
}
} else {
import("//build/ohos.gni")
config("libpng_config") {
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
}
config("libpng_wno_config") {
cflags = [ "-Wno-implicit-fallthrough" ]
if (target_platform == "pc") {
if (is_ohos && is_clang &&
(target_cpu == "arm" || target_cpu == "arm64")) {
ldflags = [ "-Wl,-Bsymbolic" ]
defines = [ "PNG_ARM_NEON" ]
}
}
}
config("libpng_wno_config_static") {
if (target_platform == "pc") {
if (is_ohos && is_clang &&
(target_cpu == "arm" || target_cpu == "arm64")) {
cflags = [ "-fvisibility=hidden" ]
}
}
}
ohos_source_set("png_static") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
external_deps = [ "zlib:libz" ]
deps = [ ":libpng_action" ]
public_configs = [ ":libpng_config" ]
part_name = "libpng"
subsystem_name = "thirdparty"
}
ohos_shared_library("libpng") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
deps = [ ":libpng_action" ]
if (is_arkui_x) {
deps += [ "//third_party/zlib:libz" ]
} else {
external_deps = [ "zlib:libz" ]
}
public_configs = [ ":libpng_config" ]
configs = [ ":libpng_wno_config" ]
innerapi_tags = [
"platformsdk",
"chipsetsdk",
]
subsystem_name = "thirdparty"
install_images = [
"system",
"updater",
]
part_name = "libpng"
output_name = "libpng"
install_enable = true
branch_protector_ret = "pac_ret"
}
ohos_static_library("libpng_static") {
sources = get_target_outputs(":libpng_action")
include_dirs = [ "${target_gen_dir}/libpng-1.6.38/" ]
deps = [ ":libpng_action" ]
if (is_arkui_x) {
deps += [ "//third_party/zlib:libz" ]
} else {
external_deps = [ "zlib:libz" ]
}
public_configs = [ ":libpng_config" ]
configs = [ ":libpng_wno_config" ]
configs += [ ":libpng_wno_config_static" ]
part_name = "libpng"
subsystem_name = "thirdparty"
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。