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/multimedia/image_framework/ide/image_decode_config.gni") 16 17ohos_shared_library("svgplugin") { 18 if (!use_clang_android && !use_clang_ios) { 19 branch_protector_ret = "pac_ret" 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 cfi_vcall_icall_only = true 24 debug = false 25 } 26 } 27 28 sources = [ 29 "src/plugin_export.cpp", 30 "src/svg_decoder.cpp", 31 ] 32 33 include_dirs = [ 34 "$image_subsystem/plugins/manager/include", 35 "$image_subsystem/plugins/manager/include/image", 36 "$image_subsystem/plugins/manager/include/pluginbase", 37 "$image_subsystem/plugins/common/libs/image/libsvgplugin/include", 38 "$image_subsystem/interfaces/innerkits/include", 39 "$image_subsystem/frameworks/innerkitsimpl/utils/include", 40 ] 41 42 deps = [ 43 "$image_subsystem/plugins/manager:pluginmanager", 44 "${image_subsystem}/frameworks/innerkitsimpl/utils:image_utils", 45 ] 46 47 external_deps = [ 48 "c_utils:utils", 49 "graphic_2d:color_manager", 50 "graphic_surface:surface", 51 "hilog:libhilog", 52 "skia:skia_canvaskit", 53 ] 54 55 cflags = [ 56 "-DIMAGE_COLORSPACE_FLAG", 57 "-DNEW_SKIA", 58 ] 59 60 innerapi_tags = [ "platformsdk" ] 61 part_name = "image_framework" 62 subsystem_name = "multimedia" 63} 64 65ohos_prebuilt_etc("svgpluginmetadata") { 66 source = "svgplugin.pluginmeta" 67 relative_install_dir = "multimediaplugin/image" 68 subsystem_name = "multimedia" 69 part_name = "image_framework" 70} 71