• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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("//build/config/components/idl_tool/idl.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17import("../../../ressched.gni")
18
19idl_gen_interface("res_sched_event_listener_interface") {
20  src_idl = rebase_path("IResSchedEventListener.idl")
21}
22
23idl_gen_interface("res_sched_service_interface") {
24  src_idl = rebase_path("IResSchedService.idl")
25}
26
27idl_gen_interface("res_sched_systemload_notifier_interface") {
28  src_idl = rebase_path("IResSchedSystemloadNotifier.idl")
29}
30
31config("client_private_config") {
32  include_dirs = [ "${ressched_common}/include" ]
33}
34
35config("client_public_config") {
36  include_dirs = [
37    "include",
38    "${target_gen_dir}",
39  ]
40}
41
42ohos_source_set("res_sched_service_stub") {
43  sanitize = {
44    cfi = true
45    cfi_cross_dso = true
46    debug = false
47  }
48  output_values = get_target_outputs(":res_sched_service_interface")
49  sources = filter_include(output_values, [ "*_stub.cpp" ])
50  public_configs = []
51  deps = [ ":res_sched_service_interface" ]
52  part_name = "resource_schedule_service"
53  subsystem_name = "resourceschedule"
54  external_deps = [
55    "c_utils:utils",
56    "ipc:ipc_core",
57  ]
58  branch_protector_ret = "pac_ret"
59}
60
61ohos_shared_library("ressched_client") {
62  configs = [ ":client_private_config" ]
63
64  public_configs = [ ":client_public_config" ]
65  deps = [
66    ":res_sched_event_listener_interface",
67    ":res_sched_service_interface",
68    ":res_sched_systemload_notifier_interface",
69  ]
70
71  sources = [
72    "src/res_sa_init.cpp",
73    "src/res_sched_client.cpp",
74    "src/res_sched_common_death_recipient.cpp",
75  ]
76
77  output_values = get_target_outputs(":res_sched_service_interface")
78  sources += filter_include(output_values, [ "*.cpp" ])
79
80  event_listener_output_values =
81      get_target_outputs(":res_sched_event_listener_interface")
82  sources += filter_include(event_listener_output_values, [ "*.cpp" ])
83
84  systemload_notifier_output_values =
85      get_target_outputs(":res_sched_systemload_notifier_interface")
86  sources += filter_include(systemload_notifier_output_values, [ "*.cpp" ])
87
88  external_deps = [
89    "c_utils:utils",
90    "ffrt:libffrt",
91    "hilog:libhilog",
92    "hitrace:hitrace_meter",
93    "ipc:ipc_core",
94    "ipc:ipc_single",
95    "samgr:samgr_proxy",
96  ]
97
98  install_images = [
99    system_base_dir,
100    updater_base_dir,
101  ]
102
103  public_external_deps = [ "json:nlohmann_json_static" ]
104
105  innerapi_tags = [ "platformsdk" ]
106  version_script = "libressched_client.versionscript"
107  subsystem_name = "resourceschedule"
108  part_name = "resource_schedule_service"
109
110  branch_protector_ret = "pac_ret"
111
112  sanitize = {
113    cfi = true
114    cfi_cross_dso = true
115    debug = false
116  }
117}
118