• 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/config/components/idl_tool/idl.gni")
15import("//foundation/resourceschedule/work_scheduler/workscheduler.gni")
16
17idl_gen_interface("work_sched_service_interface") {
18  src_idl = rebase_path("IWorkSchedService.idl")
19  log_domainid = "0xD001712"
20  log_tag = "WORK_SCHEDULER"
21}
22
23config("worksched_private_config") {
24  include_dirs = [ "${worksched_service_path}/zidl/include" ]
25}
26
27config("worksched_public_config") {
28  include_dirs = [
29    "include",
30    "${target_gen_dir}",
31  ]
32}
33
34ohos_shared_library("workschedclient") {
35  branch_protector_ret = "pac_ret"
36  sanitize = {
37    cfi = true
38    cfi_cross_dso = true
39    debug = false
40  }
41
42  output_values = get_target_outputs(":work_sched_service_interface")
43  sources = [
44    "${worksched_frameworks_path}/src/work_info.cpp",
45    "${worksched_frameworks_path}/src/workscheduler_srv_client.cpp",
46  ]
47  sources += filter_include(output_values, [ "*_proxy.cpp" ])
48
49  configs = [ ":worksched_private_config" ]
50
51  public_configs = [ ":worksched_public_config" ]
52
53  deps = [
54    ":work_sched_service_interface",
55    "${worksched_utils_path}:workschedutils",
56  ]
57
58  public_external_deps = [ "jsoncpp:jsoncpp" ]
59
60  external_deps = [
61    "ability_base:want",
62    "hilog:libhilog",
63    "ipc:ipc_single",
64    "samgr:samgr_proxy",
65  ]
66
67  subsystem_name = "resourceschedule"
68  innerapi_tags = [ "platformsdk" ]
69  part_name = "${worksched_native_part_name}"
70}
71
72ohos_source_set("work_sched_service_proxy") {
73  branch_protector_ret = "pac_ret"
74  sanitize = {
75    cfi = true
76    cfi_cross_dso = true
77    debug = false
78  }
79  public_configs = [ ":worksched_public_config" ]
80  output_values = get_target_outputs(":work_sched_service_interface")
81  sources = filter_include(output_values, [ "*_proxy.cpp" ])
82  deps = [
83    ":work_sched_service_interface",
84    "${worksched_utils_path}:workschedutils",
85  ]
86  external_deps = [
87    "ability_base:want",
88    "c_utils:utils",
89    "hilog:libhilog",
90    "ipc:ipc_core",
91    "jsoncpp:jsoncpp",
92  ]
93  subsystem_name = "resourceschedule"
94  part_name = "${worksched_native_part_name}"
95}
96
97ohos_source_set("work_sched_service_stub") {
98  branch_protector_ret = "pac_ret"
99  sanitize = {
100    cfi = true
101    cfi_cross_dso = true
102    debug = false
103  }
104  public_configs = [ ":worksched_public_config" ]
105  output_values = get_target_outputs(":work_sched_service_interface")
106  sources = filter_include(output_values, [ "*_stub.cpp" ])
107  deps = [
108    ":work_sched_service_interface",
109    "${worksched_utils_path}:workschedutils",
110  ]
111  external_deps = [
112    "ability_base:want",
113    "c_utils:utils",
114    "hilog:libhilog",
115    "ipc:ipc_core",
116    "jsoncpp:jsoncpp",
117  ]
118  subsystem_name = "resourceschedule"
119  part_name = "${worksched_native_part_name}"
120}
121