• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni")
16
17cflags = []
18
19config("bgtaskmgr_public_config") {
20  include_dirs = [ "napi/include" ]
21}
22
23ohos_shared_library("backgroundtaskmanager") {
24  branch_protector_ret = "pac_ret"
25  sanitize = {
26    cfi = true
27    cfi_cross_dso = true
28    debug = false
29  }
30  sources = [
31    "napi/src/bg_continuous_task_napi_module.cpp",
32    "napi/src/cancel_suspend_delay.cpp",
33    "napi/src/common.cpp",
34    "napi/src/efficiency_resources_operation.cpp",
35    "napi/src/get_remaining_delay_time.cpp",
36    "napi/src/init.cpp",
37    "napi/src/request_suspend_delay.cpp",
38  ]
39
40  public_configs = [ ":bgtaskmgr_public_config" ]
41
42  deps = [ "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits" ]
43
44  external_deps = [
45    "ability_base:want",
46    "ability_runtime:ability_context_native",
47    "ability_runtime:abilitykit_native",
48    "ability_runtime:napi_base_context",
49    "ability_runtime:wantagent_innerkits",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "common_event_service:cesfwk_innerkits",
54    "hilog:libhilog",
55    "ipc:ipc_single",
56    "napi:ace_napi",
57    "samgr:samgr_proxy",
58  ]
59
60  defines = []
61  if (background_task_mgr_jsstack) {
62    defines += [ "SUPPORT_JSSTACK" ]
63    external_deps += [ "hiview:libxpower_event_js" ]
64  }
65
66  relative_install_dir = "module"
67  subsystem_name = "resourceschedule"
68  part_name = "background_task_mgr"
69}
70
71ohos_shared_library("backgroundtaskmanager_napi") {
72  branch_protector_ret = "pac_ret"
73  sanitize = {
74    cfi = true
75    cfi_cross_dso = true
76    debug = false
77  }
78  sources = [
79    "napi/src/bg_continuous_task_napi_module.cpp",
80    "napi/src/cancel_suspend_delay.cpp",
81    "napi/src/common.cpp",
82    "napi/src/efficiency_resources_operation.cpp",
83    "napi/src/get_remaining_delay_time.cpp",
84    "napi/src/init_bgtaskmgr.cpp",
85    "napi/src/request_suspend_delay.cpp",
86  ]
87
88  public_configs = [ ":bgtaskmgr_public_config" ]
89
90  deps = [ "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits" ]
91
92  external_deps = [
93    "ability_base:want",
94    "ability_runtime:ability_context_native",
95    "ability_runtime:abilitykit_native",
96    "ability_runtime:napi_base_context",
97    "ability_runtime:wantagent_innerkits",
98    "bundle_framework:appexecfwk_base",
99    "bundle_framework:appexecfwk_core",
100    "c_utils:utils",
101    "common_event_service:cesfwk_innerkits",
102    "hilog:libhilog",
103    "ipc:ipc_single",
104    "napi:ace_napi",
105    "samgr:samgr_proxy",
106  ]
107
108  defines = []
109  if (background_task_mgr_jsstack) {
110    defines += [ "SUPPORT_JSSTACK" ]
111    external_deps += [ "hiview:libxpower_event_js" ]
112  }
113
114  relative_install_dir = "module/resourceschedule"
115  subsystem_name = "resourceschedule"
116  part_name = "background_task_mgr"
117}
118