# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import( "//foundation/resourceschedule/resource_schedule_service/cgroup_sched/cgroup_sched.gni") ohos_shared_library("cgroup_sched") { sources = [ "${cgroup_sched_common}/cgroup_sched_log.cpp", "sched_controller/app_state_observer.cpp", "sched_controller/cgroup_adjuster.cpp", "sched_controller/cgroup_event_handler.cpp", "sched_controller/sched_controller.cpp", "sched_controller/supervisor.cpp", "sched_controller/window_state_observer.cpp", "utils/ressched_utils.cpp", ] configs = [ "//foundation/ability/ability_runtime/interfaces/inner_api/wantagent:wantagent_innerkits_public_config" ] include_dirs = [ "../../ressched/interfaces/innerkits/ressched_client/include", "../common/include", "./sched_controller/include", "./utils/include", ] deps = [ "./process_group:libprocess_group" ] external_deps = [ "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", "window_manager:libwm", ] if (has_bg_task_mgr) { defines = [ "CONFIG_BGTASK_MGR" ] sources += [ "sched_controller/background_task_observer.cpp" ] external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] } part_name = "resource_schedule_service" subsystem_name = "resourceschedule" }