• 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  cflags_cc = [
42    "-fdata-sections",
43    "-ffunction-sections",
44    "-fstack-protector-strong",
45    "-Os",
46  ]
47  output_values = get_target_outputs(":work_sched_service_interface")
48  sources = [
49    "${worksched_frameworks_path}/src/work_info.cpp",
50    "${worksched_frameworks_path}/src/workscheduler_srv_client.cpp",
51  ]
52  sources += filter_include(output_values, [ "*_proxy.cpp" ])
53
54  configs = [ ":worksched_private_config" ]
55
56  public_configs = [ ":worksched_public_config" ]
57
58  deps = [
59    ":work_sched_service_interface",
60    "${worksched_utils_path}:workschedutils",
61  ]
62
63  external_deps = [
64    "ability_base:want",
65    "c_utils:utils",
66    "hilog:libhilog",
67    "ipc:ipc_single",
68    "samgr:samgr_proxy",
69  ]
70
71  subsystem_name = "resourceschedule"
72  innerapi_tags = [ "platformsdk" ]
73  part_name = "${worksched_native_part_name}"
74}
75
76ohos_source_set("work_sched_service_proxy") {
77  branch_protector_ret = "pac_ret"
78  sanitize = {
79    cfi = true
80    cfi_cross_dso = true
81    debug = false
82  }
83  public_configs = [ ":worksched_public_config" ]
84  output_values = get_target_outputs(":work_sched_service_interface")
85  sources = filter_include(output_values, [ "*_proxy.cpp" ])
86  deps = [
87    ":work_sched_service_interface",
88    "${worksched_utils_path}:workschedutils",
89  ]
90  external_deps = [
91    "ability_base:want",
92    "c_utils:utils",
93    "hilog:libhilog",
94    "ipc:ipc_core",
95  ]
96  subsystem_name = "resourceschedule"
97  part_name = "${worksched_native_part_name}"
98}
99
100ohos_source_set("work_sched_service_stub") {
101  branch_protector_ret = "pac_ret"
102  sanitize = {
103    cfi = true
104    cfi_cross_dso = true
105    debug = false
106  }
107  public_configs = [ ":worksched_public_config" ]
108  output_values = get_target_outputs(":work_sched_service_interface")
109  sources = filter_include(output_values, [ "*_stub.cpp" ])
110  deps = [
111    ":work_sched_service_interface",
112    "${worksched_utils_path}:workschedutils",
113  ]
114  external_deps = [
115    "ability_base:want",
116    "c_utils:utils",
117    "hilog:libhilog",
118    "ipc:ipc_core",
119  ]
120  subsystem_name = "resourceschedule"
121  part_name = "${worksched_native_part_name}"
122}
123