• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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      if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
24        cflags = [
25          "--diag_suppress",
26          "Pa084",
27        ]
28      }
29    } else {
30      target_type = "shared_library"
31    }
32    sources = libgif_source
33
34    public_configs = [ ":libgif_config" ]
35  }
36} else {
37  import("//build/ohos.gni")
38
39  config("build_private_config") {
40    cflags = [
41      "-Werror",
42      "-Wno-format",
43      "-Wno-sign-compare",
44      "-Wno-unused-parameter",
45      "-DHAVE_CONFIG_H",
46    ]
47  }
48
49  ohos_source_set("gif_static") {
50    sources = [
51      "//third_party/giflib/dgif_lib.c",
52      "//third_party/giflib/egif_lib.c",
53      "//third_party/giflib/gif_err.c",
54      "//third_party/giflib/gif_font.c",
55      "//third_party/giflib/gif_hash.c",
56      "//third_party/giflib/gifalloc.c",
57      "//third_party/giflib/openbsd-reallocarray.c",
58      "//third_party/giflib/quantize.c",
59    ]
60    include_dirs = [ "//third_party/giflib" ]
61    configs = [ ":build_private_config" ]
62  }
63
64  ohos_shared_library("libgif") {
65    deps = [ ":gif_static" ]
66    subsystem_name = "thirdparty"
67    part_name = "thirdparty_giflib"
68    output_name = "libgif"
69    install_enable = true
70  }
71}
72