1# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../../build/ts.gni") 16 17config("zlib_config") { 18 cflags = [ 19 "-Wno-incompatible-pointer-types", 20 "-Werror", 21 "-Wno-strict-prototypes", 22 "-Wimplicit-function-declaration", 23 "-D HAVE_BZIP2", 24 ] 25} 26 27config("zlib_public_config") { 28 include_dirs = [ "." ] 29} 30 31ohos_source_set("libz") { 32 sources = [ 33 "adler32.c", 34 "compress.c", 35 "contrib/minizip/ioapi.c", 36 "contrib/minizip/unzip.c", 37 "contrib/minizip/zip.c", 38 "crc32.c", 39 "crc32.h", 40 "deflate.c", 41 "deflate.h", 42 "gzclose.c", 43 "gzguts.h", 44 "gzlib.c", 45 "gzread.c", 46 "gzwrite.c", 47 "infback.c", 48 "inffast.c", 49 "inffast.h", 50 "inffixed.h", 51 "inflate.c", 52 "inflate.h", 53 "inftrees.c", 54 "inftrees.h", 55 "trees.c", 56 "trees.h", 57 "uncompr.c", 58 "zconf.h", 59 "zlib.h", 60 "zutil.c", 61 "zutil.h", 62 ] 63 configs += [ ":zlib_config" ] 64 public_configs = [ ":zlib_public_config" ] 65 public_deps = [ "${THIRD_PARTY}/bzip2:libbz2" ] 66 part_name = "zlib" 67 subsystem_name = "thirdparty" 68} 69