• 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    "-fdata-sections",
28    "-ffunction-sections",
29    "-gline-tables-only",
30    "-funwind-tables",
31    "-Wno-unused-parameter",
32    "-fvisibility=hidden",
33  ]
34}
35
36ohos_source_set("ace_libpng") {
37  part_name = flutter_part
38  subsystem_name = flutter_subsystem
39  license_file = "$flutter_root/skia/third_party/externals/libpng/LICENSE"
40  configs = [ ":ace_libpng_config" ]
41
42  deps = [ "//third_party/zlib:libz" ]
43
44  sources = [
45    "$flutter_root/skia/third_party/externals/libpng/arm/arm_init.c",
46    "$flutter_root/skia/third_party/externals/libpng/arm/filter_neon_intrinsics.c",
47    "$flutter_root/skia/third_party/externals/libpng/arm/palette_neon_intrinsics.c",
48    "$flutter_root/skia/third_party/externals/libpng/png.c",
49    "$flutter_root/skia/third_party/externals/libpng/pngerror.c",
50    "$flutter_root/skia/third_party/externals/libpng/pngget.c",
51    "$flutter_root/skia/third_party/externals/libpng/pngmem.c",
52    "$flutter_root/skia/third_party/externals/libpng/pngpread.c",
53    "$flutter_root/skia/third_party/externals/libpng/pngread.c",
54    "$flutter_root/skia/third_party/externals/libpng/pngrio.c",
55    "$flutter_root/skia/third_party/externals/libpng/pngrtran.c",
56    "$flutter_root/skia/third_party/externals/libpng/pngrutil.c",
57    "$flutter_root/skia/third_party/externals/libpng/pngset.c",
58    "$flutter_root/skia/third_party/externals/libpng/pngtrans.c",
59    "$flutter_root/skia/third_party/externals/libpng/pngwio.c",
60    "$flutter_root/skia/third_party/externals/libpng/pngwrite.c",
61    "$flutter_root/skia/third_party/externals/libpng/pngwtran.c",
62    "$flutter_root/skia/third_party/externals/libpng/pngwutil.c",
63  ]
64
65  defines = [ "PNG_SET_OPTION_SUPPORTED" ]
66}
67