• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16import("//third_party/flutter/flutter_config.gni")
17
18config("ace_libpng_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "$flutter_root/skia/third_party/libpng",
22    "$flutter_root/skia/third_party/externals/libpng",
23  ]
24  cflags = [
25    "-w",
26    "-fstrict-aliasing",
27    "-Os",
28    "-fdata-sections",
29    "-ffunction-sections",
30    "-gline-tables-only",
31    "-funwind-tables",
32    "-Wno-unused-parameter",
33    "-fvisibility=hidden",
34  ]
35}
36
37ohos_source_set("ace_libpng") {
38  part_name = flutter_part
39  subsystem_name = flutter_subsystem
40  license_file = "$flutter_root/skia/third_party/externals/libpng/LICENSE"
41  configs = [ ":ace_libpng_config" ]
42
43  deps = [ "//third_party/zlib:libz" ]
44
45  sources = [
46    "$flutter_root/skia/third_party/externals/libpng/arm/arm_init.c",
47    "$flutter_root/skia/third_party/externals/libpng/arm/filter_neon_intrinsics.c",
48    "$flutter_root/skia/third_party/externals/libpng/arm/palette_neon_intrinsics.c",
49    "$flutter_root/skia/third_party/externals/libpng/png.c",
50    "$flutter_root/skia/third_party/externals/libpng/pngerror.c",
51    "$flutter_root/skia/third_party/externals/libpng/pngget.c",
52    "$flutter_root/skia/third_party/externals/libpng/pngmem.c",
53    "$flutter_root/skia/third_party/externals/libpng/pngpread.c",
54    "$flutter_root/skia/third_party/externals/libpng/pngread.c",
55    "$flutter_root/skia/third_party/externals/libpng/pngrio.c",
56    "$flutter_root/skia/third_party/externals/libpng/pngrtran.c",
57    "$flutter_root/skia/third_party/externals/libpng/pngrutil.c",
58    "$flutter_root/skia/third_party/externals/libpng/pngset.c",
59    "$flutter_root/skia/third_party/externals/libpng/pngtrans.c",
60    "$flutter_root/skia/third_party/externals/libpng/pngwio.c",
61    "$flutter_root/skia/third_party/externals/libpng/pngwrite.c",
62    "$flutter_root/skia/third_party/externals/libpng/pngwtran.c",
63    "$flutter_root/skia/third_party/externals/libpng/pngwutil.c",
64  ]
65
66  defines = [ "PNG_SET_OPTION_SUPPORTED" ]
67}
68