1 Star 0 Fork 139

hw_mzyan/third_party_zlib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 2.42 KB
一键复制 编辑 原始数据 按行查看 历史
hw_mzyan 提交于 2024-02-23 14:03 . feat: add zlib library to chipsetsdk
# Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
import("//build/config/config.gni")
import("//build/ohos.gni")
import("//build/ohos/ndk/ndk.gni")
config("zlib_config") {
cflags = [
"-Wno-incompatible-pointer-types",
"-Werror",
"-Wno-strict-prototypes",
"-Wimplicit-function-declaration",
]
}
config("zlib_public_config") {
include_dirs = [ "." ]
}
ohos_static_library("libz") {
sources = [
"adler32.c",
"compress.c",
"contrib/minizip/ioapi.c",
"contrib/minizip/unzip.c",
"contrib/minizip/zip.c",
"crc32.c",
"crc32.h",
"deflate.c",
"deflate.h",
"gzclose.c",
"gzguts.h",
"gzlib.c",
"gzread.c",
"gzwrite.c",
"infback.c",
"inffast.c",
"inffast.h",
"inffixed.h",
"inflate.c",
"inflate.h",
"inftrees.c",
"inftrees.h",
"trees.c",
"trees.h",
"uncompr.c",
"zconf.h",
"zlib.h",
"zutil.c",
"zutil.h",
]
configs = [ ":zlib_config" ]
public_configs = [ ":zlib_public_config" ]
part_name = "zlib"
subsystem_name = "thirdparty"
}
ohos_shared_library("shared_libz") {
sources = [
"adler32.c",
"compress.c",
"contrib/minizip/ioapi.c",
"contrib/minizip/unzip.c",
"contrib/minizip/zip.c",
"crc32.c",
"crc32.h",
"deflate.c",
"deflate.h",
"gzclose.c",
"gzguts.h",
"gzlib.c",
"gzread.c",
"gzwrite.c",
"infback.c",
"inffast.c",
"inffast.h",
"inffixed.h",
"inflate.c",
"inflate.h",
"inftrees.c",
"inftrees.h",
"trees.c",
"trees.h",
"uncompr.c",
"zconf.h",
"zlib.h",
"zutil.c",
"zutil.h",
]
configs = [ ":zlib_config" ]
public_configs = [ ":zlib_public_config" ]
if (current_os == "ios") {
ldflags = [
"-Wl",
"-install_name",
"@rpath/libshared_libz.framework/libshared_libz",
]
}
install_images = [
"system",
"updater",
]
symlink_target_name = [ "libz.so" ]
innerapi_tags = [
"chipsetsdk",
"platformsdk",
]
part_name = "zlib"
subsystem_name = "thirdparty"
}
if (current_os == "ios") {
ohos_combine_darwin_framework("libshared_libz") {
deps = [ ":shared_libz" ]
subsystem_name = "thirdparty"
part_name = "zlib"
}
}
ohos_ndk_headers("zlib_header") {
sources = [
"./zconf.h",
"./zlib.h",
]
}
ohos_ndk_library("libz_ndk") {
output_name = "z"
ndk_description_file = "./zlib.ndk.json"
output_extension = "so"
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hw-mzyan/third_party_zlib.git
[email protected]:hw-mzyan/third_party_zlib.git
hw-mzyan
third_party_zlib
third_party_zlib
master

搜索帮助