# Copyright (c) 2021-2023 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("../../../../../powermgr.gni") import("../actions.gni") config("powermgr_actions_impl_public_config") { include_dirs = [ "." ] } config("powermgr_display_actions_impl_public_config") { include_dirs = [ "./display" ] } config("powermgr_actions_common_config") { include_dirs = [ "${powermgr_inner_api}/native/include", "${powermgr_service_path}/native/include", ] } ohos_source_set("${powermgr_actions_default_target}") { sources = [ "device_power_action.cpp", "running_lock_action.cpp", "suspend/running_lock_hub.cpp", "suspend/suspend_controller.cpp", "system_suspend_controller.cpp", ] configs = [ ":powermgr_actions_common_config", "${powermgr_utils_path}:utils_config", "${powermgr_utils_path}:coverage_flags", ] public_configs = [ ":powermgr_actions_impl_public_config" ] deps = [ "${powermgr_utils_path}/ffrt:power_ffrt" ] external_deps = [ "c_utils:utils", "drivers_interface_power:libpower_proxy_1.1", "ffrt:libffrt", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hdf_core:libpub_utils", "hilog:libhilog", "image_framework:image_native", "init:libbegetutil", "ipc:ipc_core", ] if (has_display_manager_part) { sources += [ "display/device_state_action.cpp" ] public_configs += [ ":powermgr_display_actions_impl_public_config" ] external_deps += [ "display_manager:displaymgr", "window_manager:libdm", ] } else { sources += [ "display/default_device_state_action.cpp" ] } subsystem_name = "powermgr" part_name = "${powermgr_part_name}" }