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/multimedia/image_framework/ide/image_decode_config.gni") 17 18config("ani_config") { 19 include_dirs = [ "native/include" ] 20} 21 22group("image_framework_ani") { 23 deps = [ 24 ":image_ani_core", 25 ":image_framework_abc_etc", 26 ] 27} 28 29ohos_shared_library("image_ani_core") { 30 if (!use_clang_android) { 31 sanitize = { 32 cfi = true 33 cfi_cross_dso = true 34 cfi_vcall_icall_only = true 35 debug = false 36 } 37 } 38 include_dirs = [ "native/include" ] 39 sources = [ 40 "native/src/ani_image_module.cpp", 41 "native/src/image_ani_utils.cpp", 42 "native/src/image_packer_ani.cpp", 43 "native/src/image_source_ani.cpp", 44 "native/src/picture_ani.cpp", 45 "native/src/pixel_map_ani.cpp", 46 ] 47 deps = [ 48 "${image_subsystem}/frameworks/innerkitsimpl/utils:image_utils", 49 "${image_subsystem}/interfaces/innerkits:image_native", 50 "${image_subsystem}/interfaces/kits/js/common:image", 51 ] 52 external_deps = [ 53 "ability_runtime:ability_runtime", 54 "c_utils:utils", 55 "hilog:libhilog", 56 "hitrace:hitrace_meter", 57 "ipc:ipc_core", 58 "runtime_core:ani", 59 "runtime_core:libarkruntime", 60 ] 61 subsystem_name = "multimedia" 62 part_name = "image_framework" 63 output_extension = "so" 64} 65 66# APIs exposed to external modules 67ohos_shared_library("image_ani") { 68 public_configs = [ ":ani_config" ] 69 if (!use_clang_android) { 70 sanitize = { 71 cfi = true 72 cfi_cross_dso = true 73 cfi_vcall_icall_only = true 74 debug = false 75 } 76 } 77 include_dirs = [ "native/include" ] 78 sources = [ 79 "native/src/image_ani_utils.cpp", 80 "native/src/image_packer_ani.cpp", 81 "native/src/image_source_ani.cpp", 82 "native/src/picture_ani.cpp", 83 "native/src/pixel_map_ani.cpp", 84 ] 85 deps = [ 86 ":image_ani_core", 87 "${image_subsystem}/frameworks/innerkitsimpl/utils:image_utils", 88 "${image_subsystem}/interfaces/innerkits:image_native", 89 "${image_subsystem}/interfaces/kits/js/common:image", 90 ] 91 external_deps = [ 92 "ability_runtime:ability_runtime", 93 "c_utils:utils", 94 "hilog:libhilog", 95 "hitrace:hitrace_meter", 96 "ipc:ipc_core", 97 "runtime_core:ani", 98 "runtime_core:libarkruntime", 99 ] 100 subsystem_name = "multimedia" 101 part_name = "image_framework" 102 output_extension = "so" 103} 104 105generate_static_abc("image_framework_abc") { 106 base_url = "./ets" 107 files = [ "./ets/@ohos.multimedia.image.ets" ] 108 dst_file = "$target_out_dir/image_framework.abc" 109 out_puts = [ "$target_out_dir/image_framework.abc" ] 110 is_boot_abc = "True" 111 device_dst_file = "/system/framework/image_framework.abc" 112} 113 114ohos_prebuilt_etc("image_framework_abc_etc") { 115 source = "$target_out_dir/image_framework.abc" 116 module_install_dir = "framework" 117 subsystem_name = "multimedia" 118 part_name = "image_framework" 119 deps = [ ":image_framework_abc" ] 120} 121 122generate_static_abc("image_framework_test_abc") { 123 base_url = "./ets" 124 files = [ 125 "./ets/imageTest.ets", 126 "./ets/@ohos.multimedia.image.ets", 127 ] 128 dst_file = "$target_out_dir/image_framework_test.abc" 129 out_puts = [ "$target_out_dir/image_framework_test.abc" ] 130 is_boot_abc = "True" 131 device_dst_file = "/system/framework/image_framework_test.abc" 132} 133