1# 2# Copyright (c) 2020 Huawei Device Co., Ltd. 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16import("//build/lite/config/component/lite_component.gni") 17 18config("zlib_config") { 19 include_dirs = [ 20 "//third_party/zlib", 21 ] 22} 23 24zlib_source = [ 25 "//third_party/zlib/adler32.c", 26 "//third_party/zlib/compress.c", 27 "//third_party/zlib/crc32.c", 28 "//third_party/zlib/crc32.h", 29 "//third_party/zlib/deflate.c", 30 "//third_party/zlib/deflate.h", 31 "//third_party/zlib/gzclose.c", 32 "//third_party/zlib/gzguts.h", 33 "//third_party/zlib/gzlib.c", 34 "//third_party/zlib/gzread.c", 35 "//third_party/zlib/gzwrite.c", 36 "//third_party/zlib/infback.c", 37 "//third_party/zlib/inffast.c", 38 "//third_party/zlib/inffast.h", 39 "//third_party/zlib/inffixed.h", 40 "//third_party/zlib/inflate.h", 41 "//third_party/zlib/inflate.c", 42 "//third_party/zlib/inftrees.c", 43 "//third_party/zlib/inftrees.h", 44 "//third_party/zlib/trees.c", 45 "//third_party/zlib/trees.h", 46 "//third_party/zlib/uncompr.c", 47 "//third_party/zlib/zconf.h", 48 "//third_party/zlib/zlib.h", 49 "//third_party/zlib/zutil.c", 50 "//third_party/zlib/zutil.h", 51 "//third_party/zlib/contrib/minizip/ioapi.c", 52 "//third_party/zlib/contrib/minizip/unzip.c", 53 "//third_party/zlib/contrib/minizip/zip.c", 54] 55 56lite_library("zlib_shared") { 57 target_type = "shared_library" 58 sources = zlib_source 59 60 public_configs = [ 61 ":zlib_config", 62 ] 63} 64 65lite_library("zlib_static") { 66 target_type = "static_library" 67 sources = zlib_source 68 69 public_configs = [ 70 ":zlib_config", 71 ] 72} 73