1# Copyright (C) 2022 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/multimedia/image_framework/ide/image_decode_config.gni") 16 17SEPARATOR = "/" 18BASE_DIR = "$SEPARATOR/foundation" 19 20config("native_public_config") { 21 include_dirs = [ 22 "include", 23 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include", 24 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image", 25 "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include", 26 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk", 27 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk", 28 ] 29} 30 31ohos_shared_library("image_ndk") { 32 sanitize = { 33 cfi = true 34 cfi_cross_dso = true 35 cfi_vcall_icall_only = true 36 debug = false 37 } 38 39 sources = [ "image_mdk.cpp" ] 40 public_configs = [ ":native_public_config" ] 41 deps = [ "$image_subsystem/interfaces/kits/js/common:image" ] 42 external_deps = [ 43 "c_utils:utils", 44 "graphic_surface:surface", 45 "ipc:ipc_single", 46 "napi:ace_napi", 47 ] 48 49 innerapi_tags = [ "ndk" ] 50 subsystem_name = "multimedia" 51 part_name = "image_framework" 52} 53 54ohos_shared_library("image_receiver_ndk") { 55 sanitize = { 56 cfi = true 57 cfi_cross_dso = true 58 cfi_vcall_icall_only = true 59 debug = false 60 } 61 62 sources = [ "image_receiver_mdk.cpp" ] 63 public_configs = [ ":native_public_config" ] 64 deps = [ "$image_subsystem/interfaces/kits/js/common:image" ] 65 external_deps = [ 66 "c_utils:utils", 67 "graphic_2d:color_manager", 68 "graphic_surface:surface", 69 "ipc:ipc_single", 70 "napi:ace_napi", 71 ] 72 73 innerapi_tags = [ "ndk" ] 74 subsystem_name = "multimedia" 75 part_name = "image_framework" 76} 77 78ohos_shared_library("image_source_ndk") { 79 sanitize = { 80 cfi = true 81 cfi_cross_dso = true 82 cfi_vcall_icall_only = true 83 debug = false 84 } 85 86 sources = [ "image_source_mdk.cpp" ] 87 public_configs = [ ":native_public_config" ] 88 deps = [ "$image_subsystem/interfaces/kits/js/common:image" ] 89 90 external_deps = [ 91 "c_utils:utils", 92 "ipc:ipc_single", 93 "napi:ace_napi", 94 "resource_management:librawfile", 95 ] 96 97 innerapi_tags = [ "ndk" ] 98 subsystem_name = "multimedia" 99 part_name = "image_framework" 100} 101 102ohos_shared_library("image_packer_ndk") { 103 sanitize = { 104 cfi = true 105 cfi_cross_dso = true 106 cfi_vcall_icall_only = true 107 debug = false 108 } 109 110 sources = [ "image_packer_mdk.cpp" ] 111 public_configs = [ ":native_public_config" ] 112 deps = [ "$image_subsystem/interfaces/kits/js/common:image" ] 113 114 external_deps = [ 115 "c_utils:utils", 116 "ipc:ipc_single", 117 "napi:ace_napi", 118 ] 119 120 innerapi_tags = [ "ndk" ] 121 subsystem_name = "multimedia" 122 part_name = "image_framework" 123} 124 125ohos_shared_library("image_source") { 126 output_extension = "so" 127 sanitize = { 128 cfi = true 129 cfi_cross_dso = true 130 cfi_vcall_icall_only = true 131 debug = false 132 } 133 134 sources = [ 135 "image_source_native.cpp", 136 "image_source_native_impl.cpp", 137 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/image_error_convert.cpp", 138 ] 139 140 include_dirs = [ 141 "include", 142 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include", 143 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image", 144 "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include", 145 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk", 146 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk/include", 147 "$BASE_DIR/multimedia/image_framework/frameworks/innerkitsimpl/utils/include", 148 ] 149 150 deps = [ 151 "$image_subsystem/frameworks/innerkitsimpl/utils:image_utils", 152 "$image_subsystem/frameworks/kits/js/common/picture_ndk:picture", 153 "$image_subsystem/frameworks/kits/js/common/pixelmap_ndk:pixelmap", 154 "$image_subsystem/interfaces/innerkits:image_native", 155 "$image_subsystem/interfaces/kits/js/common:image", 156 ] 157 158 external_deps = [ 159 "c_utils:utils", 160 "graphic_2d:color_space_object_convertor", 161 "graphic_2d:libnative_color_space_manager", 162 "hilog:libhilog", 163 "napi:ace_napi", 164 "libjpeg-turbo:turbojpeg", 165 "resource_management:librawfile", 166 "skia:libjpeg", 167 "ipc:ipc_single", 168 ] 169 170 innerapi_tags = [ "ndk" ] 171 subsystem_name = "multimedia" 172 part_name = "image_framework" 173} 174 175ohos_shared_library("image_packer") { 176 output_extension = "so" 177 sanitize = { 178 cfi = true 179 cfi_cross_dso = true 180 cfi_vcall_icall_only = true 181 debug = false 182 } 183 184 sources = [ 185 "image_packer_native.cpp", 186 "image_packer_native_impl.cpp", 187 ] 188 189 include_dirs = [ 190 "include", 191 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include", 192 "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image", 193 "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include", 194 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk", 195 "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk/include", 196 ] 197 198 deps = [ 199 "$image_subsystem/frameworks/kits/js/common/ndk:image_source", 200 "$image_subsystem/frameworks/kits/js/common/picture_ndk:picture", 201 "$image_subsystem/frameworks/kits/js/common/pixelmap_ndk:pixelmap", 202 "$image_subsystem/interfaces/innerkits:image_native", 203 "$image_subsystem/interfaces/kits/js/common:image", 204 ] 205 206 external_deps = [ 207 "c_utils:utils", 208 "hilog:libhilog", 209 "napi:ace_napi", 210 "resource_management:librawfile", 211 "ipc:ipc_single", 212 ] 213 214 innerapi_tags = [ "ndk" ] 215 subsystem_name = "multimedia" 216 part_name = "image_framework" 217} 218