diff --git a/BUILD.gn b/BUILD.gn index 1debc8b0f63e1351ef58ef49f5f4300d5a519b88..908d2654148fb6efbd156296252cebdf90077c04 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -59,6 +59,49 @@ ohos_static_library("libz") { subsystem_name = "thirdparty" } +config("zlib_static_config") { + include_dirs = [ + ".", + "contrib/minizip", + ] +} +ohos_static_library("libz_static") { + sources = [ + "adler32.c", + "compress.c", + "contrib/minizip/ioapi.c", + "contrib/minizip/unzip.c", + "contrib/minizip/zip.c", + "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_static_config" ] + + part_name = "zlib" + subsystem_name = "thirdparty" +} + ohos_shared_library("shared_libz") { sources = [ "adler32.c", diff --git a/bundle.json b/bundle.json index 43c2fd5e13ef12914b38f9d9021ad1c139bc8740..54beaeca37443607ea44ebca9ee6ca88fa93af4a 100644 --- a/bundle.json +++ b/bundle.json @@ -40,6 +40,13 @@ "header_files": "" }, "name": "//third_party/zlib:shared_libz" + }, + { + "header": { + "header_base": "//third_party/zlib", + "header_files": "" + }, + "name": "//third_party/zlib:libz_static" } ], "test": []