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