1# Copyright (c) 2024 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")
16ohos_shared_library("cj_resource_manager_ffi") {
17  include_dirs = [
18    "../../dfx/hisysevent_adapter",
19    "../../frameworks/resmgr/include",
20    "../inner_api/include",
21  ]
22
23  if (!build_ohos_sdk) {
24    deps = [ "../../frameworks/resmgr:global_resmgr" ]
25
26    external_deps = [
27      "ability_base:configuration",
28      "ace_engine:drawable_descriptor",
29      "bounds_checking_function:libsec_shared",
30      "bundle_framework:appexecfwk_base",
31      "c_utils:utils",
32      "hilog:libhilog",
33      "hisysevent:libhisysevent",
34      "hitrace:hitrace_meter",
35      "napi:ace_napi",
36      "napi:cj_bind_ffi",
37      "napi:cj_bind_native",
38    ]
39
40    sources = [
41      "src/resource_manager_ffi.cpp",
42      "src/resource_manager_impl.cpp",
43      "src/utils.cpp",
44    ]
45  } else {
46    sources = [ "src/resource_manager_mock.cpp" ]
47  }
48
49  innerapi_tags = [ "platformsdk" ]
50  subsystem_name = "global"
51  part_name = "resource_management"
52}
53