1# Copyright (c) 2021-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("//base/hiviewdfx/hiview/hiview.gni")
15import("//build/ohos.gni")
16
17config("sys_event_service_adapter_config") {
18  visibility = [ "*:*" ]
19
20  include_dirs = [
21    ".",
22    "$hiview_adapter/plugins/eventservice/service/idl/include",
23  ]
24}
25
26ohos_shared_library("sys_event_service_adapter") {
27  branch_protector_ret = "pac_ret"
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    cfi_vcall_icall_only = true
32    debug = false
33  }
34  part_name = "hiview"
35  include_dirs = [ "$hiview_adapter/plugins/eventservice/service/idl/include" ]
36
37  public_configs = [ ":sys_event_service_adapter_config" ]
38
39  sources = [ "sys_event_service_adapter.cpp" ]
40
41  deps = [
42    "$hiview_adapter/plugins/eventservice/service/idl:sys_event_service_ohos",
43  ]
44
45  external_deps = [
46    "hilog:libhilog",
47    "ipc:ipc_single",
48    "jsoncpp:jsoncpp",
49    "safwk:system_ability_fwk",
50    "samgr:samgr_proxy",
51  ]
52}
53
54group("unittest") {
55  testonly = true
56  deps = [ "test:SysEventServiceOhosUnitTest" ]
57}
58