1# Copyright (c) 2020-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/lite/config/component/lite_component.gni")
15import("//build/ohos.gni")
16import("../../build/config.gni")
17
18if (os_level != "mini") {
19  lite_library("pms_target") {
20    target_type = "shared_library"
21    sources = [
22      "src/perm_operate.c",
23      "src/pms_impl.c",
24      "src/pms_inner.c",
25      "src/pms_server.c",
26      "src/pms_server_internal.c",
27    ]
28
29    include_dirs = [
30      "../../interfaces/kits",
31      "include",
32      "include/hals",
33      "../pms_base/include",
34    ]
35
36    deps = [
37      "${ipc_path}/interfaces/innerkits/c/ipc:ipc_single",
38      "${ohos_product_adapter_dir}/security/permission_lite:hal_pms",
39      "${samgr_lite_path}/samgr:samgr",
40      "../pms_base:pms_base",
41      "//build/lite/config/component/cJSON:cjson_shared",
42      "//third_party/bounds_checking_function:libsec_shared",
43    ]
44  }
45} else {
46  ohos_static_library("pms_target_static") {
47    subsystem_name = "permission_lite"
48    part_name = "permission_lite"
49    sources = [
50      "src/perm_operate.c",
51      "src/pms_impl.c",
52    ]
53
54    include_dirs = [
55      "../../interfaces/kits",
56      "include",
57      "include/hals",
58      "//third_party/cJSON",
59      "${hilog_lite_path}/interfaces/native/kits/hilog_lite",
60    ]
61
62    deps = [
63      "${pms_hal_path}:hal_pms_static",
64      "//build/lite/config/component/cJSON:cjson_static",
65    ]
66  }
67}
68