• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/powermgr/power_manager/powermgr.gni")
15import("../actions.gni")
16
17config("powermgr_actions_impl_public_config") {
18  include_dirs = [ "." ]
19}
20config("powermgr_display_actions_impl_public_config") {
21  include_dirs = [ "./display" ]
22}
23
24ohos_source_set("${powermgr_actions_default_target}") {
25  sources = [
26    "device_power_action.cpp",
27    "running_lock_action.cpp",
28    "suspend/running_lock_hub.cpp",
29    "suspend/suspend_controller.cpp",
30    "system_suspend_controller.cpp",
31  ]
32
33  public_configs = [ ":powermgr_actions_impl_public_config" ]
34
35  deps = [ "../:powermgr_actions_common" ]
36
37  external_deps = [
38    "c_utils:utils",
39    "drivers_interface_power:libpower_proxy_1.0",
40    "eventhandler:libeventhandler",
41    "hdf_core:libhdf_utils",
42    "hdf_core:libhdi",
43    "hiviewdfx_hilog_native:libhilog",
44    "init:libbegetutil",
45    "ipc:ipc_core",
46    "multimedia_image_framework:image_native",
47  ]
48
49  if (has_display_manager_part) {
50    sources += [ "display/device_state_action.cpp" ]
51    public_configs += [ ":powermgr_display_actions_impl_public_config" ]
52    deps += [ "//foundation/window/window_manager/utils:libwmutil" ]
53    external_deps += [
54      "display_manager:displaymgr",
55      "window_manager:libdm",
56    ]
57  } else {
58    sources += [ "display/default_device_state_action.cpp" ]
59  }
60
61  part_name = "${powermgr_part_name}"
62}
63