• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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.
13import("//build/ohos.gni")
14import("//foundation/graphic/graphic_3d/lume/lume_config.gni")
15config("lume_png_api") {
16  include_dirs = [ "api" ]
17}
18
19config("lume_png_config") {
20  include_dirs = [ "src" ]
21  defines = [
22    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
23    "CORE_STATIC_PLUGIN_HEADER=${CORE_STATIC_PLUGIN_HEADER}",
24  ]
25  if (LUME_OHOS_BUILD) {
26    defines += [ "__OHOS_PLATFORM__" ]
27  }
28}
29
30ohos_source_set("lume_png_src") {
31  configs = [
32    ":lume_png_api",
33    ":lume_png_config",
34    "${LUME_CORE_PATH}:lume_base_api",
35    "${LUME_CORE_PATH}:lume_engine_api",
36  ]
37
38  sources = [ "src/png/image_loader_png.cpp" ]
39
40  external_deps = [
41    "c_utils:utils",
42    "libpng:libpng",
43  ]
44
45  part_name = "graphic_3d"
46  subsystem_name = "graphic"
47}
48
49ohos_static_library("libPngStatic") {
50  deps = [ ":lume_png_src" ]
51
52  part_name = "graphic_3d"
53  subsystem_name = "graphic"
54}
55
56config("lume_plugin_png_config") {
57  defines = [ "CORE_PLUGIN=1" ]
58}
59
60ohos_source_set("lume_plugin_png_src") {
61  sources = [ "src/component_dll.cpp" ]
62
63  configs = [
64    ":lume_plugin_png_config",
65    ":lume_png_config",
66    ":lume_png_api",
67    "${LUME_CORE_PATH}:lume_base_api",
68    "${LUME_CORE_PATH}:lume_engine_api",
69  ]
70
71  external_deps = [ "bounds_checking_function:libsec_shared" ]
72
73  part_name = "graphic_3d"
74  subsystem_name = "graphic"
75}
76
77ohos_shared_library(LIB_PNG) {
78  deps = [
79    ":libPngStatic",
80    ":lume_plugin_png_src",
81  ]
82
83  relative_install_dir = "graphics3d"
84  part_name = "graphic_3d"
85  subsystem_name = "graphic"
86}
87