1# Copyright (c) 2021 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/distributed_notification_service/notification.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("reminderagent") {
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    "../../include",
42    "//third_party/node/src",
43    "//third_party/libuv/include",
44  ]
45
46  configs = [ ":native_module_config" ]
47
48  sources = [
49    "../common.cpp",
50    "../common_convert_content.cpp",
51    "../common_convert_liveview.cpp",
52    "../common_convert_notification.cpp",
53    "../common_convert_request.cpp",
54    "../common_utils.cpp",
55    "../slot.cpp",
56    "native_module.cpp",
57    "publish.cpp",
58    "reminder_common.cpp",
59  ]
60
61  deps = [ "${frameworks_module_ans_path}:ans_innerkits" ]
62
63  external_deps = [
64    "ability_base:want",
65    "ability_base:zuri",
66    "ability_runtime:abilitykit_native",
67    "ability_runtime:napi_common",
68    "ability_runtime:wantagent_innerkits",
69    "access_token:libaccesstoken_sdk",
70    "access_token:libtokenid_sdk",
71    "c_utils:utils",
72    "hilog:libhilog",
73    "image_framework:image",
74    "ipc:ipc_single",
75    "napi:ace_napi",
76    "relational_store:native_rdb",
77  ]
78
79  relative_install_dir = "module"
80  subsystem_name = "${subsystem_name}"
81  part_name = "${component_name}"
82}
83
84# used for error code
85ohos_shared_library("reminderagentmanager") {
86  sanitize = {
87    integer_overflow = true
88    ubsan = true
89    boundary_sanitize = true
90    cfi = true
91    cfi_cross_dso = true
92    debug = false
93  }
94  branch_protector_ret = "pac_ret"
95
96  include_dirs = [
97    "../../include",
98    "../../include/manager",
99    "//third_party/node/src",
100    "//third_party/libuv/include",
101  ]
102
103  configs = [ ":native_module_config" ]
104
105  sources = [
106    "../common.cpp",
107    "../common_utils.cpp",
108    "../manager/napi_slot.cpp",
109    "../slot.cpp",
110    "native_module_manager.cpp",
111    "publish.cpp",
112    "reminder_common.cpp",
113  ]
114
115  deps = [ "${frameworks_module_ans_path}:ans_innerkits" ]
116
117  external_deps = [
118    "ability_base:want",
119    "ability_base:zuri",
120    "ability_runtime:abilitykit_native",
121    "ability_runtime:napi_common",
122    "ability_runtime:wantagent_innerkits",
123    "access_token:libaccesstoken_sdk",
124    "access_token:libtokenid_sdk",
125    "c_utils:utils",
126    "hilog:libhilog",
127    "image_framework:image",
128    "ipc:ipc_single",
129    "napi:ace_napi",
130    "relational_store:native_rdb",
131  ]
132
133  relative_install_dir = "module"
134  subsystem_name = "${subsystem_name}"
135  part_name = "${component_name}"
136}
137