• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/powermgr_lite/powermgr.gni")
15import("//build/lite/config/component/lite_component.gni")
16
17local_include_dirs = []
18local_deps = []
19local_sources = []
20
21if (is_liteos_m) {
22  local_include_dirs += [
23    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
24    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
25  ]
26} else {
27  local_include_dirs += [
28    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
29    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
30    "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
31  ]
32  local_deps += [
33    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
34    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
35  ]
36
37  if (enable_screensaver) {
38    local_sources += [ "src/screen_saver_feature.c" ]
39    local_deps += [ "src/screensaver/${system_type}:screensaver_featrue_impl" ]
40  }
41}
42
43lite_library("powermgrservice") {
44  target_type = lite_library_type
45
46  sources = [
47    "src/power/auto_suspend.c",
48    "src/power/running_lock_hub.c",
49    "src/power/suspend_controller.c",
50    "src/power_manage_feature.c",
51    "src/power_manage_service.c",
52    "src/running_lock_mgr.c",
53  ]
54  sources += local_sources
55
56  include_dirs = [
57    "include",
58    "${powermgr_frameworks_path}/include",
59    "${powermgr_frameworks_path}/include/${system_type}",
60    "${powermgr_innerkits_path}",
61    "${powermgr_kits_path}",
62    "//commonlibrary/utils_lite/include",
63  ]
64  include_dirs += local_include_dirs
65
66  deps = [
67    "src/power/${system_type}:powermanage_feature_impl",
68    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
69  ]
70  deps += local_deps
71}
72