• 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  local_deps += [ "//kernel/liteos_m/kal/posix:posix" ]
27} else {
28  local_include_dirs += [
29    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
30    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
31    "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
32  ]
33  local_deps += [
34    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
35    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
36  ]
37
38  if (enable_screensaver) {
39    local_sources += [ "src/screen_saver_feature.c" ]
40    local_deps += [ "src/screensaver/${system_type}:screensaver_featrue_impl" ]
41  }
42}
43
44lite_library("powermgrservice") {
45  target_type = lite_library_type
46
47  sources = [
48    "src/power/auto_suspend.c",
49    "src/power/running_lock_hub.c",
50    "src/power/suspend_controller.c",
51    "src/power_manage_feature.c",
52    "src/power_manage_service.c",
53    "src/running_lock_mgr.c",
54  ]
55  sources += local_sources
56
57  include_dirs = [
58    "include",
59    "${powermgr_frameworks_path}/include",
60    "${powermgr_frameworks_path}/include/${system_type}",
61    "${powermgr_innerkits_path}",
62    "${powermgr_kits_path}",
63    "//commonlibrary/utils_lite/include",
64  ]
65  include_dirs += local_include_dirs
66
67  deps = [
68    "src/power/${system_type}:powermanage_feature_impl",
69    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
70  ]
71  deps += local_deps
72}
73