• 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.
13
14import("//build/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//foundation/graphic/graphic_2d/graphic_config.gni")
17
18## Build effectKit_ani.so
19config("graphic_ani_effect_kit_config") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-Wall",
24    "-Werror",
25    "-g3",
26    "-Wno-pointer-arith",
27    "-Wno-non-virtual-dtor",
28    "-Wno-missing-field-initializers",
29    "-Wno-c++11-narrowing",
30    "-Wno-unused-but-set-variable",
31  ]
32
33  defines = [ "EGL_EGLEXT_PROTOTYPES" ]
34}
35
36ohos_shared_library("effectKit_ani") {
37  branch_protector_ret = "pac_ret"
38
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    cfi_vcall_icall_only = true
43    debug = false
44  }
45
46  include_dirs = [
47    "./include",
48    "$graphic_2d_root/rosen/modules/effect/effectChain/include",
49    "$graphic_2d_root/rosen/modules/effect/egl/include",
50    "$graphic_2d_root/rosen/modules/effect/color_picker/include",
51    "$graphic_2d_root/rosen/modules/effect/skia_effectChain/include",
52    "$graphic_2d_root/utils/color_manager/export",
53  ]
54
55  public_configs = []
56
57  configs = [ ":graphic_ani_effect_kit_config" ]
58
59  sources = [
60    "./src/ani_effect_kit_module.cpp",
61    "./src/ani_effect_kit_utils.cpp",
62    "./src/ani_filter.cpp",
63  ]
64
65  deps = [
66    "$graphic_2d_root/rosen/modules/effect/color_picker:color_picker",
67    "$graphic_2d_root/rosen/modules/effect/skia_effectChain:skeffectchain",
68  ]
69
70  external_deps = [
71    "c_utils:utils",
72    "hilog:libhilog",
73    "image_framework:image",
74    "image_framework:image_taihe",
75    "runtime_core:ani",
76    "runtime_core:libarkruntime",
77  ]
78
79  part_name = "graphic_2d"
80  subsystem_name = "graphic"
81  output_extension = "so"
82}
83
84## Build effectKit_ani.so
85
86generate_static_abc("effectKit") {
87  base_url = "./ets"  # base_url需配置到导出接口文件的所在目录
88  files = [
89    "./ets/@ohos.effectKit.ets",
90    "./ets/effectKit_entry.ets",
91  ]
92  is_boot_abc = "True"
93  device_dst_file = "/system/framework/effectKit.abc"
94}
95ohos_prebuilt_etc("effectKit_etc") {
96  source = "$target_out_dir/effectKit.abc"
97  module_install_dir = "framework"
98  part_name = "graphic_2d"
99  subsystem_name = "graphic"
100  deps = [ ":effectKit" ]
101}
102