• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//base/notification/common_event_service/event.gni")
15import("//build/ohos.gni")
16
17cflags = []
18
19config("native_module_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = []
23
24  if (target_cpu == "arm") {
25    cflags += [ "-DBINDER_IPC_32BIT" ]
26  }
27}
28
29ohos_shared_library("cj_common_event_manager_ffi") {
30  sanitize = {
31    integer_overflow = true
32    ubsan = true
33    boundary_sanitize = true
34    cfi = true
35    cfi_cross_dso = true
36    debug = false
37  }
38  branch_protector_ret = "pac_ret"
39
40  include_dirs = [
41    "../napi/common_event/include",
42    "../../../interfaces/inner_api",
43  ]
44
45  configs = [ ":native_module_config" ]
46
47  if (!build_ohos_sdk) {
48    deps = [
49      "../../../frameworks/core:cesfwk_core",
50      "../../../frameworks/native:cesfwk_innerkits",
51    ]
52
53    external_deps = [
54      "ability_base:base",
55      "ability_base:want",
56      "ability_runtime:ability_manager",
57      "ability_runtime:abilitykit_native",
58      "ability_runtime:napi_base_context",
59      "c_utils:utils",
60      "ffrt:libffrt",
61      "hilog:libhilog",
62      "ipc:ipc_single",
63      "napi:cj_bind_ffi",
64      "napi:cj_bind_native",
65    ]
66
67    sources = [
68      "src/common_event.cpp",
69      "src/common_event_manager_ffi.cpp",
70      "src/common_event_manager_impl.cpp",
71      "src/parameter_parse.cpp",
72      "src/subscribe_info.cpp",
73      "src/subscriber.cpp",
74    ]
75  } else {
76    sources = [ "src/common_event_manager_mock.cpp" ]
77  }
78
79  innerapi_tags = [ "platformsdk" ]
80  subsystem_name = "notification"
81  part_name = "common_event_service"
82}
83