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 if (ohos_kernel_type == "liteos_m") { 22 target_type = "static_library" 23 } else { 24 target_type = "shared_library" 25 } 26 sources = libgif_source 27 28 public_configs = [ ":libgif_config" ] 29 } 30} else { 31 import("//build/ohos.gni") 32 33 config("build_private_config") { 34 cflags = [ 35 "-Werror", 36 "-Wno-format", 37 "-Wno-sign-compare", 38 "-Wno-unused-parameter", 39 "-DHAVE_CONFIG_H", 40 ] 41 } 42 43 ohos_source_set("gif_static") { 44 sources = [ 45 "//third_party/giflib/dgif_lib.c", 46 "//third_party/giflib/egif_lib.c", 47 "//third_party/giflib/gif_err.c", 48 "//third_party/giflib/gif_font.c", 49 "//third_party/giflib/gif_hash.c", 50 "//third_party/giflib/gifalloc.c", 51 "//third_party/giflib/openbsd-reallocarray.c", 52 "//third_party/giflib/quantize.c", 53 ] 54 include_dirs = [ "//third_party/giflib" ] 55 configs = [ ":build_private_config" ] 56 } 57 58 ohos_shared_library("libgif") { 59 deps = [ ":gif_static" ] 60 subsystem_name = "common" 61 } 62} 63