• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../../../resmgr.gni")
16
17config("resmgr_napi_core_public_config") {
18  include_dirs = [
19    "include",
20    "../../../../dfx/hisysevent_adapter",
21    "../../../../frameworks/resmgr/include",
22  ]
23}
24
25ohos_shared_library("resmgr_napi_core") {
26  sources = [
27    "../../../../dfx/hisysevent_adapter/hisysevent_adapter.cpp",
28    "src/resource_manager_addon.cpp",
29    "src/resource_manager_napi_async_impl.cpp",
30    "src/resource_manager_napi_context.cpp",
31    "src/resource_manager_napi_sync_impl.cpp",
32    "src/resource_manager_napi_utils.cpp",
33  ]
34
35  defines = [ "CONFIG_HILOG" ]
36
37  version_script = "libresmgr_napi_core.versionscript"
38
39  public_configs = [ ":resmgr_napi_core_public_config" ]
40
41  deps = [ "../../../../frameworks/resmgr:global_resmgr" ]
42
43  external_deps = [
44    "ability_base:configuration",
45    "ace_engine:drawable_descriptor",
46    "bounds_checking_function:libsec_shared",
47    "bundle_framework:appexecfwk_base",
48    "hilog:libhilog",
49    "hisysevent:libhisysevent",
50    "hitrace:hitrace_meter",
51    "napi:ace_napi",
52  ]
53
54  if (resource_management_support_icu) {
55    defines += [ "SUPPORT_GRAPHICS" ]
56  }
57
58  branch_protector_ret = "pac_ret"
59  sanitize = {
60    boundary_sanitize = true
61    cfi = true
62    cfi_cross_dso = true
63    debug = false
64    integer_overflow = true
65    ubsan = true
66  }
67  subsystem_name = "global"
68  innerapi_tags = [ "platformsdk" ]
69  part_name = "resource_management"
70}
71