1# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. 2 3if (defined(ohos_lite)) { # is on lite Os for ipcamera 4 import("//build/lite/config/component/lite_component.gni") 5 6 config("libgif_config") { 7 include_dirs = [ "//third_party/giflib" ] 8 } 9 10 libgif_source = [ 11 "//third_party/giflib/dgif_lib.c", 12 "//third_party/giflib/egif_lib.c", 13 "//third_party/giflib/gifalloc.c", 14 "//third_party/giflib/gif_err.c", 15 "//third_party/giflib/gif_font.c", 16 "//third_party/giflib/gif_hash.c", 17 "//third_party/giflib/openbsd-reallocarray.c", 18 ] 19 20 lite_library("libgif") { 21 target_type = "shared_library" 22 sources = libgif_source 23 24 public_configs = [ ":libgif_config" ] 25 } 26} else { 27 import("//build/ohos.gni") 28 29 config("build_private_config") { 30 cflags = [ 31 "-Werror", 32 "-Wno-format", 33 "-Wno-sign-compare", 34 "-Wno-unused-parameter", 35 "-DHAVE_CONFIG_H", 36 ] 37 } 38 39 ohos_source_set("gif_static") { 40 sources = [ 41 "//third_party/giflib/dgif_lib.c", 42 "//third_party/giflib/egif_lib.c", 43 "//third_party/giflib/gif_err.c", 44 "//third_party/giflib/gif_font.c", 45 "//third_party/giflib/gif_hash.c", 46 "//third_party/giflib/gifalloc.c", 47 "//third_party/giflib/openbsd-reallocarray.c", 48 "//third_party/giflib/quantize.c", 49 ] 50 include_dirs = [ "//third_party/giflib" ] 51 configs = [ ":build_private_config" ] 52 } 53 54 ohos_shared_library("libgif") { 55 deps = [ ":gif_static" ] 56 subsystem_name = "common" 57 } 58} 59