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 = [] 19 20if (is_liteos_m) { 21 local_include_dirs += [ 22 "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 23 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 24 ] 25} else { 26 local_include_dirs += 27 [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include" ] 28 local_deps += [ 29 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 30 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 31 "//third_party/bounds_checking_function:libsec_shared", 32 ] 33} 34 35config("powermgr_public_config") { 36 include_dirs = [ 37 "${powermgr_innerkits_path}", 38 "${powermgr_kits_path}", 39 ] 40} 41 42lite_library("powermgr") { 43 target_type = lite_library_type 44 45 sources = [ "src/running_lock.c" ] 46 47 include_dirs = [ 48 "include", 49 "include/${system_type}", 50 "//commonlibrary/utils_lite/include", 51 ] 52 include_dirs += local_include_dirs 53 54 public_configs = [ ":powermgr_public_config" ] 55 56 deps = [ 57 "src/${system_type}:powermanage_impl", 58 "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 59 ] 60 deps += local_deps 61 62 if (enable_screensaver) { 63 deps += [ "src/${system_type}:screensaver_impl" ] 64 } 65} 66