# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") config("drawable_config") { include_dirs = [ "${ace_root}", "${ace_root}/frameworks", "${ace_root}/interfaces/napi/kits/utils", "${ace_root}/adapter/ohos/osal", "${ace_root}/frameworks/core/components_ng/render", "${ace_root}/interfaces/frameworks", "${ace_root}/interfaces/inner_api/drawable_descriptor", "${ace_root}/interfaces/napi/kits/drawabledescriptor", "${graphic_2d_path}/utils/color_manager/export", "//foundation/multimedia/image_framework/interfaces/innerkits/include", ] if (current_os != "ohos") { include_dirs += [ "//base/global/resource_management/frameworks/resmgr/include", "//base/global/resource_management/interfaces/inner_api/include", ] } } ohos_shared_library("drawable_descriptor") { if (current_os == "ohos") { sanitize = { integer_overflow = true boundary_sanitize = true debug = ace_sanitize_debug } } public_configs = [ ":drawable_config" ] configs = [ "$ace_root:ace_config", "$ace_root:ace_coverage_config", ] sources = [ "drawable_descriptor.cpp", "image_converter.cpp", "js_drawable_descriptor.cpp", ] deps = [ "$cjson_root:cjson", "$skia_root_new:skia_ohos", ] defines = [] external_deps = [ "graphic_2d:librender_service_client", "hilog:libhilog", "napi:ace_napi", ] if (current_os == "ohos") { external_deps += [ "graphic_2d:2d_graphics", "graphic_2d:color_manager", "image_framework:image", "image_framework:image_native", "resource_management:global_resmgr", ] } else { defines += [ "PREVIEW" ] external_deps += [ "hilog:libhilog" ] if (use_mingw_win) { defines += [ "WINDOWS_PLATFORM" ] external_deps += [ "resource_management:win_resmgr" ] } if (use_mac) { defines += [ "MAC_PLATFORM" ] external_deps += [ "resource_management:mac_resmgr" ] } if (use_linux) { defines += [ "LINUX_PLATFORM" ] external_deps += [ "resource_management:linux_resmgr" ] } } subsystem_name = ace_engine_subsystem innerapi_tags = [ "platformsdk" ] part_name = ace_engine_part }