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") 15 16config("zlib_config") { 17 cflags = [ 18 "-Wno-incompatible-pointer-types", 19 "-Werror", 20 "-Wno-strict-prototypes", 21 "-Wimplicit-function-declaration", 22 ] 23} 24 25config("zlib_public_config") { 26 include_dirs = [ "." ] 27} 28 29ohos_source_set("libz") { 30 sources = [ 31 "adler32.c", 32 "compress.c", 33 "contrib/minizip/ioapi.c", 34 "contrib/minizip/unzip.c", 35 "contrib/minizip/zip.c", 36 "crc32.c", 37 "crc32.h", 38 "deflate.c", 39 "deflate.h", 40 "gzclose.c", 41 "gzguts.h", 42 "gzlib.c", 43 "gzread.c", 44 "gzwrite.c", 45 "infback.c", 46 "inffast.c", 47 "inffast.h", 48 "inffixed.h", 49 "inflate.c", 50 "inflate.h", 51 "inftrees.c", 52 "inftrees.h", 53 "trees.c", 54 "trees.h", 55 "uncompr.c", 56 "zconf.h", 57 "zlib.h", 58 "zutil.c", 59 "zutil.h", 60 ] 61 configs += [ ":zlib_config" ] 62 public_configs = [ ":zlib_public_config" ] 63 64 part_name = "zlib" 65 subsystem_name = "thirdparty" 66}