# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/powermgr/powermgr_lite/powermgr.gni") import("//build/lite/config/component/lite_component.gni") local_include_dirs = [] local_deps = [] if (is_liteos_m) { local_include_dirs += [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", ] local_deps += [ "//kernel/liteos_m/kal/posix:posix" ] } else { local_include_dirs += [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include" ] local_deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", "//third_party/bounds_checking_function:libsec_shared", ] } config("powermgr_public_config") { include_dirs = [ "${powermgr_innerkits_path}", "${powermgr_kits_path}", ] } lite_library("powermgr") { target_type = lite_library_type sources = [ "src/running_lock.c" ] include_dirs = [ "include", "include/${system_type}", "//commonlibrary/utils_lite/include", ] include_dirs += local_include_dirs public_configs = [ ":powermgr_public_config" ] deps = [ "src/${system_type}:powermanage_impl", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] deps += local_deps if (enable_screensaver) { deps += [ "src/${system_type}:screensaver_impl" ] } }