1cb69b360Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2cb69b360Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb69b360Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb69b360Sopenharmony_ci# You may obtain a copy of the License at 5cb69b360Sopenharmony_ci# 6cb69b360Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb69b360Sopenharmony_ci# 8cb69b360Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb69b360Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb69b360Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb69b360Sopenharmony_ci# See the License for the specific language governing permissions and 12cb69b360Sopenharmony_ci# limitations under the License. 13cb69b360Sopenharmony_ci 14cb69b360Sopenharmony_ciimport("//base/powermgr/powermgr_lite/powermgr.gni") 15cb69b360Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 16cb69b360Sopenharmony_ci 17cb69b360Sopenharmony_cilocal_include_dirs = [] 18cb69b360Sopenharmony_cilocal_deps = [] 19cb69b360Sopenharmony_cilocal_sources = [] 20cb69b360Sopenharmony_ci 21cb69b360Sopenharmony_ciif (is_liteos_m) { 22cb69b360Sopenharmony_ci local_include_dirs += [ 23cb69b360Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 24cb69b360Sopenharmony_ci "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 25cb69b360Sopenharmony_ci ] 26cb69b360Sopenharmony_ci} else { 27cb69b360Sopenharmony_ci local_include_dirs += [ 28cb69b360Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 29cb69b360Sopenharmony_ci "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 30cb69b360Sopenharmony_ci "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", 31cb69b360Sopenharmony_ci ] 32cb69b360Sopenharmony_ci local_deps += [ 33cb69b360Sopenharmony_ci "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 34cb69b360Sopenharmony_ci "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 35cb69b360Sopenharmony_ci ] 36cb69b360Sopenharmony_ci 37cb69b360Sopenharmony_ci if (enable_screensaver) { 38cb69b360Sopenharmony_ci local_sources += [ "src/screen_saver_feature.c" ] 39cb69b360Sopenharmony_ci local_deps += [ "src/screensaver/${system_type}:screensaver_featrue_impl" ] 40cb69b360Sopenharmony_ci } 41cb69b360Sopenharmony_ci} 42cb69b360Sopenharmony_ci 43cb69b360Sopenharmony_cilite_library("powermgrservice") { 44cb69b360Sopenharmony_ci target_type = lite_library_type 45cb69b360Sopenharmony_ci 46cb69b360Sopenharmony_ci sources = [ 47cb69b360Sopenharmony_ci "src/power/auto_suspend.c", 48cb69b360Sopenharmony_ci "src/power/running_lock_hub.c", 49cb69b360Sopenharmony_ci "src/power/suspend_controller.c", 50cb69b360Sopenharmony_ci "src/power_manage_feature.c", 51cb69b360Sopenharmony_ci "src/power_manage_service.c", 52cb69b360Sopenharmony_ci "src/running_lock_mgr.c", 53cb69b360Sopenharmony_ci ] 54cb69b360Sopenharmony_ci sources += local_sources 55cb69b360Sopenharmony_ci 56cb69b360Sopenharmony_ci include_dirs = [ 57cb69b360Sopenharmony_ci "include", 58cb69b360Sopenharmony_ci "${powermgr_frameworks_path}/include", 59cb69b360Sopenharmony_ci "${powermgr_frameworks_path}/include/${system_type}", 60cb69b360Sopenharmony_ci "${powermgr_innerkits_path}", 61cb69b360Sopenharmony_ci "${powermgr_kits_path}", 62cb69b360Sopenharmony_ci "//commonlibrary/utils_lite/include", 63cb69b360Sopenharmony_ci ] 64cb69b360Sopenharmony_ci include_dirs += local_include_dirs 65cb69b360Sopenharmony_ci 66cb69b360Sopenharmony_ci deps = [ 67cb69b360Sopenharmony_ci "src/power/${system_type}:powermanage_feature_impl", 68cb69b360Sopenharmony_ci "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 69cb69b360Sopenharmony_ci ] 70cb69b360Sopenharmony_ci deps += local_deps 71cb69b360Sopenharmony_ci} 72