• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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/arkui/ace_engine/ace_config.gni")
16
17config("drawable_config") {
18  include_dirs = [
19    "${ace_root}",
20    "${ace_root}/frameworks",
21    "${ace_root}/interfaces/napi/kits/utils",
22    "${ace_root}/adapter/ohos/osal",
23    "${ace_root}/frameworks/core/components_ng/render",
24    "${ace_root}/interfaces/frameworks",
25    "${ace_root}/interfaces/inner_api/drawable_descriptor",
26    "${ace_root}/interfaces/napi/kits/drawabledescriptor",
27    "${graphic_2d_path}/utils/color_manager/export",
28    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
29  ]
30  if (current_os != "ohos") {
31    include_dirs += [
32      "//base/global/resource_management/frameworks/resmgr/include",
33      "//base/global/resource_management/interfaces/inner_api/include",
34    ]
35  }
36}
37
38ohos_shared_library("drawable_descriptor") {
39  if (current_os == "ohos") {
40    sanitize = {
41      integer_overflow = true
42      boundary_sanitize = true
43      debug = ace_sanitize_debug
44    }
45  }
46  public_configs = [ ":drawable_config" ]
47
48  configs = [
49    "$ace_root:ace_config",
50    "$ace_root:ace_coverage_config",
51  ]
52
53  sources = [
54    "drawable_descriptor.cpp",
55    "image_converter.cpp",
56    "js_drawable_descriptor.cpp",
57  ]
58
59  deps = [
60    "$cjson_root:cjson",
61    "$skia_root_new:skia_ohos",
62  ]
63  defines = []
64  external_deps = [
65    "graphic_2d:librender_service_client",
66    "hilog:libhilog",
67    "napi:ace_napi",
68  ]
69
70  if (current_os == "ohos") {
71    external_deps += [
72      "graphic_2d:2d_graphics",
73      "graphic_2d:color_manager",
74      "image_framework:image",
75      "image_framework:image_native",
76      "resource_management:global_resmgr",
77    ]
78  } else {
79    defines += [ "PREVIEW" ]
80    external_deps += [ "hilog:libhilog" ]
81    if (use_mingw_win) {
82      defines += [ "WINDOWS_PLATFORM" ]
83      external_deps += [ "resource_management:win_resmgr" ]
84    }
85
86    if (use_mac) {
87      defines += [ "MAC_PLATFORM" ]
88      external_deps += [ "resource_management:mac_resmgr" ]
89    }
90
91    if (use_linux) {
92      defines += [ "LINUX_PLATFORM" ]
93      external_deps += [ "resource_management:linux_resmgr" ]
94    }
95  }
96
97  subsystem_name = ace_engine_subsystem
98  innerapi_tags = [ "platformsdk" ]
99  part_name = ace_engine_part
100}
101