1# Copyright (c) 2023-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")
15
16config("plugin_kits_config") {
17  include_dirs = [
18    "include",
19    "include/utils",
20    "../common/include",
21    "../../../common/native/include",
22  ]
23}
24
25ohos_shared_library("plugin_kits") {
26  sources = [
27    "./src/iplugin.cpp",
28    "./src/iplugin_manager.cpp",
29    "./src/ipolicy_manager.cpp",
30    "./src/utils/array_map_serializer.cpp",
31    "./src/utils/array_string_serializer.cpp",
32    "./src/utils/bool_serializer.cpp",
33    "./src/utils/cjson_serializer.cpp",
34    "./src/utils/func_code_utils.cpp",
35    "./src/utils/int_serializer.cpp",
36    "./src/utils/json_serializer.cpp",
37    "./src/utils/long_serializer.cpp",
38    "./src/utils/map_string_serializer.cpp",
39    "./src/utils/string_serializer.cpp",
40  ]
41
42  version_script = "libplugin_kits.map"
43
44  public_configs = [ ":plugin_kits_config" ]
45
46  configs = [ "../../../common/config:coverage_flags" ]
47
48  deps = [ "../../../common/native:edm_commom" ]
49
50  external_deps = [
51    "cJSON:cjson",
52    "c_utils:utils",
53    "hilog:libhilog",
54    "jsoncpp:jsoncpp",
55  ]
56
57  sanitize = {
58    boundary_sanitize = true
59    cfi = true
60    cfi_cross_dso = true
61    debug = false
62    integer_overflow = true
63    ubsan = true
64  }
65  branch_protector_ret = "pac_ret"
66  subsystem_name = "customization"
67  part_name = "enterprise_device_management"
68}
69