1# Copyright (c) 2023 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("../../../windowmanager_aafwk.gni")
16
17config("intention_event_public_config") {
18  include_dirs = [
19    "anr_manager/include",
20    "event_stage/include",
21    "timer_manager/include",
22    "../../../utils/include",
23    "../../session/container/include/zidl",
24    "../../interfaces/include",
25    "../../../interfaces/innerkits/wm",
26    "../../",
27    "../dfx/include",
28    "../framework/anr_handler/include",
29    "../utils/include",
30  ]
31}
32
33ohos_shared_library("intention_event_anr_manager") {
34  branch_protector_ret = "pac_ret"
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    cfi_vcall_icall_only = true
39    debug = false
40  }
41  sources = [
42    "../dfx/src/dfx_hisysevent.cpp",
43    "../framework/anr_handler/src/anr_handler.cpp",
44    "../utils/src/util.cpp",
45  ]
46
47  public_configs = [ ":intention_event_public_config" ]
48  public_external_deps = [ "accessibility:accessibility_common" ]
49  external_deps = [
50    "ability_base:want",
51    "c_utils:utils",
52    "eventhandler:libeventhandler",
53    "hicollie:libhicollie",
54    "hilog:libhilog",
55    "hisysevent:libhisysevent",
56    "hitrace:hitrace_meter",
57    "ipc:ipc_single",
58  ]
59
60  if (defined(global_parts_info) &&
61      defined(global_parts_info.barrierfree_accessibility)) {
62    external_deps += [ "accessibility:accessibility_common" ]
63  }
64  part_name = "window_manager"
65  subsystem_name = "window"
66
67  defines = []
68  if (build_variant == "user") {
69    defines += [ "IS_RELEASE_VERSION" ]
70  }
71}
72