1# Copyright (c) 2021-2022 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/display_manager/displaymgr.gni") 15import("//base/powermgr/power_manager/powermgr.gni") 16 17config("displaymgr_private_config") { 18 include_dirs = [ 19 "${powermgr_utils_path}/setting/include", 20 "${powermgr_utils_path}/native/include", 21 "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", 22 "//base/powermgr/display_manager/interfaces/innerkits/native/include", 23 ] 24} 25 26config("displaymgr_public_config") { 27 include_dirs = [ 28 "native/include", 29 "zidl/include", 30 ] 31} 32 33ohos_shared_library("displaymgrservice") { 34 sources = [ 35 "native/src/display_auto_brightness.cpp", 36 "native/src/display_event_handler.cpp", 37 "native/src/display_param_helper.cpp", 38 "native/src/display_power_mgr_service.cpp", 39 "native/src/display_system_ability.cpp", 40 "native/src/gradual_animator.cpp", 41 "native/src/screen_action.cpp", 42 "native/src/screen_controller.cpp", 43 "zidl/src/display_power_callback_proxy.cpp", 44 "zidl/src/display_power_mgr_stub.cpp", 45 ] 46 47 configs = [ 48 "${displaymgr_utils_path}:utils_config", 49 ":displaymgr_private_config", 50 ] 51 52 public_configs = [ ":displaymgr_public_config" ] 53 54 deps = [ 55 "${powermgr_utils_path}/param:power_sysparam", 56 "${powermgr_utils_path}/permission:power_permission", 57 "${powermgr_utils_path}/setting:power_setting", 58 ] 59 60 external_deps = [ 61 "ability_runtime:ability_manager", 62 "c_utils:utils", 63 "data_share:datashare_consumer", 64 "eventhandler:libeventhandler", 65 "hicollie_native:libhicollie", 66 "hisysevent_native:libhisysevent", 67 "hiviewdfx_hilog_native:libhilog", 68 "ipc:ipc_core", 69 "multimedia_image_framework:image_native", 70 "safwk:system_ability_fwk", 71 "sensor:sensor_interface_native", 72 "window_manager:libdm", 73 ] 74 75 part_name = "${displaymgr_part_name}" 76} 77 78ohos_shared_library("displaymgr_stub") { 79 sources = [ "zidl/src/display_power_mgr_stub.cpp" ] 80 81 configs = [ 82 "${displaymgr_utils_path}:utils_config", 83 ":displaymgr_private_config", 84 ] 85 86 public_configs = [ ":displaymgr_public_config" ] 87 88 external_deps = [ 89 "c_utils:utils", 90 "hicollie_native:libhicollie", 91 "hiviewdfx_hilog_native:libhilog", 92 "ipc:ipc_core", 93 "safwk:system_ability_fwk", 94 ] 95 96 part_name = "${displaymgr_part_name}" 97} 98