From 56fca8ddecd626ce15f832915145def3dbde205a Mon Sep 17 00:00:00 2001 From: k00229000 Date: Thu, 14 Mar 2019 11:23:41 +0800 Subject: [PATCH] TicketNo:AR000BTGJM Description:zlib GN build config Team:OTHERS Feature or Bugfix:Feature Binary Source:No PrivateCode(Yes/No):No Change-Id: I120ccdb29c99723ed7ab374f619e055cb5a66dee Reviewed-on: http://mgit-tm.rnd.huawei.com/4059049 Reviewed-by: wuyonghui 00321266 Tested-by: public jenkins Reviewed-by: wangxing 00438353 --- BUILD.gn | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ gzguts.h | 1 + 2 files changed, 51 insertions(+) create mode 100644 BUILD.gn diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 0000000..7ebe168 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. + +import("//build/zidane.gni") + +config("zlib_config") { + include_dirs = [ "." ] + cflags = [ + "-Wno-incompatible-pointer-types", + "-Werror", + "-Wimplicit-function-declaration", + ] +} + +static_library("libz") { + sources = [ + "adler32.c", + "compress.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.h", + "inflate.c", + "inftrees.c", + "inftrees.h", + "trees.c", + "trees.h", + "uncompr.c", + "zconf.h", + "zlib.h", + "zutil.c", + "zutil.h", + "contrib/minizip/ioapi.c", + "contrib/minizip/unzip.c", + ] + public_configs = [ ":zlib_config" ] +} + +static_library("libz_test") { + deps = [":libz"] +} diff --git a/gzguts.h b/gzguts.h index 990a4d2..96f30c5 100644 --- a/gzguts.h +++ b/gzguts.h @@ -30,6 +30,7 @@ # define _POSIX_SOURCE #endif #include +#include #ifdef _WIN32 # include -- GitLab