BUILD.gn 3.4 KB
Newer Older
S
s00567839 已提交
1 2
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.

M
mamingshuai 已提交
3 4
if (defined(ohos_lite)) {
  import("//build/lite/config/component/lite_component.gni")
S
s00567839 已提交
5

M
mamingshuai 已提交
6 7 8
  config("libpng_config") {
    include_dirs = [ "//third_party/libpng" ]
  }
S
s00567839 已提交
9

M
mamingshuai 已提交
10
  libpng_source = [
S
s00567839 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    "//third_party/libpng/png.c",
    "//third_party/libpng/pngerror.c",
    "//third_party/libpng/pngget.c",
    "//third_party/libpng/pngmem.c",
    "//third_party/libpng/pngpread.c",
    "//third_party/libpng/pngread.c",
    "//third_party/libpng/pngrio.c",
    "//third_party/libpng/pngrtran.c",
    "//third_party/libpng/pngrutil.c",
    "//third_party/libpng/pngset.c",
    "//third_party/libpng/pngtrans.c",
    "//third_party/libpng/pngwio.c",
    "//third_party/libpng/pngwrite.c",
    "//third_party/libpng/pngwtran.c",
    "//third_party/libpng/pngwutil.c",
    "//third_party/libpng/arm/arm_init.c",
    "//third_party/libpng/arm/filter_neon_intrinsics.c",
    "//third_party/libpng/arm/palette_neon_intrinsics.c",
M
mamingshuai 已提交
29
  ]
S
s00567839 已提交
30

M
mamingshuai 已提交
31
  lite_library("libpng") {
S
s00567839 已提交
32 33 34
    target_type = "shared_library"
    sources = libpng_source

M
mamingshuai 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
    public_configs = [ ":libpng_config" ]

    deps = [ "//build/lite/config/component/zlib:zlib_shared" ]
  }
} else {
  import("//build/ohos.gni")

  config("libpng_config") {
    include_dirs = [ "//third_party/libpng" ]
  }

  ohos_source_set("png_static") {
    sources = [
      "//third_party/libpng/arm/arm_init.c",
      "//third_party/libpng/arm/filter_neon_intrinsics.c",
      "//third_party/libpng/arm/palette_neon_intrinsics.c",
      "//third_party/libpng/png.c",
      "//third_party/libpng/pngerror.c",
      "//third_party/libpng/pngget.c",
      "//third_party/libpng/pngmem.c",
      "//third_party/libpng/pngpread.c",
      "//third_party/libpng/pngread.c",
      "//third_party/libpng/pngrio.c",
      "//third_party/libpng/pngrtran.c",
      "//third_party/libpng/pngrutil.c",
      "//third_party/libpng/pngset.c",
      "//third_party/libpng/pngtrans.c",
      "//third_party/libpng/pngwio.c",
      "//third_party/libpng/pngwrite.c",
      "//third_party/libpng/pngwtran.c",
      "//third_party/libpng/pngwutil.c",
S
s00567839 已提交
66
    ]
M
mamingshuai 已提交
67 68 69 70 71 72 73 74 75 76
    include_dirs = [
      "//third_party/libpng",
      "//third_party/zlib",
    ]
  }

  ohos_shared_library("libpng") {
    deps = [ ":libpng_static" ]
    public_configs = [ ":libpng_config" ]
    subsystem_name = "common"
S
sun_fan 已提交
77 78 79
    module_install_dir = "lib"
    install_images = [ "updater" ]
    part_name = "graphic_standard"
M
mamingshuai 已提交
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
  }

  ohos_static_library("libpng_static") {
    sources = [
      "//third_party/libpng/arm/arm_init.c",
      "//third_party/libpng/arm/filter_neon_intrinsics.c",
      "//third_party/libpng/arm/palette_neon_intrinsics.c",
      "//third_party/libpng/png.c",
      "//third_party/libpng/pngerror.c",
      "//third_party/libpng/pngget.c",
      "//third_party/libpng/pngmem.c",
      "//third_party/libpng/pngpread.c",
      "//third_party/libpng/pngread.c",
      "//third_party/libpng/pngrio.c",
      "//third_party/libpng/pngrtran.c",
      "//third_party/libpng/pngrutil.c",
      "//third_party/libpng/pngset.c",
      "//third_party/libpng/pngtrans.c",
      "//third_party/libpng/pngwio.c",
      "//third_party/libpng/pngwrite.c",
      "//third_party/libpng/pngwtran.c",
      "//third_party/libpng/pngwutil.c",
    ]

    include_dirs = [
      "//third_party/libpng",
      "//third_party/zlib",
S
s00567839 已提交
107
    ]
M
mamingshuai 已提交
108 109 110 111
    deps = [ "//third_party/zlib:libz" ]
    public_configs = [ ":libpng_config" ]
    subsystem_name = "common"
  }
S
s00567839 已提交
112
}