1# Copyright (c) 2023 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("//build/ohos.gni") 15import("../../windowmanager_aafwk.gni") 16 17config("session_public_config") { 18 include_dirs = [ 19 "${window_base_path}/window_scene", 20 "${window_base_path}/window_scene/intention_event/service/anr_manager/include", 21 "${window_base_path}/window_scene/intention_event/framework/anr_handler/include", 22 "${window_base_path}/window_scene/intention_event/utils/include", 23 "${window_base_path}/interfaces/innerkits/dm", 24 "${window_base_path}/wm/include/zidl", 25 26 # for window_manager_hilog 27 "${window_base_path}/utils/include", 28 "${window_base_path}/window_scene/common/include", 29 30 # for WMError Code 31 "${window_base_path}/interfaces/innerkits/wm", 32 ] 33} 34 35ohos_shared_library("scene_session") { 36 branch_protector_ret = "pac_ret" 37 sanitize = { 38 cfi = true 39 cfi_cross_dso = true 40 cfi_vcall_icall_only = true 41 debug = false 42 } 43 sources = [ 44 "container/src/window_event_channel.cpp", 45 "container/src/zidl/session_stage_proxy.cpp", 46 "container/src/zidl/session_stage_stub.cpp", 47 "container/src/zidl/window_event_channel_proxy.cpp", 48 "container/src/zidl/window_event_channel_stub.cpp", 49 "host/src/extension_session.cpp", 50 "host/src/keyboard_session.cpp", 51 "host/src/main_session.cpp", 52 "host/src/move_drag_controller.cpp", 53 "host/src/root_scene_session.cpp", 54 "host/src/scb_system_session.cpp", 55 "host/src/scene_persistence.cpp", 56 "host/src/scene_persistent_storage.cpp", 57 "host/src/scene_session.cpp", 58 "host/src/session.cpp", 59 "host/src/sub_session.cpp", 60 "host/src/system_session.cpp", 61 "host/src/ws_ffrt_helper.cpp", 62 "host/src/zidl/session_proxy.cpp", 63 "host/src/zidl/session_stub.cpp", 64 ] 65 66 public_configs = [ ":session_public_config" ] 67 68 deps = [ 69 "${window_base_path}/dm:libdm", 70 "${window_base_path}/utils:libwmutil", 71 "${window_base_path}/utils:libwmutil_base", 72 "${window_base_path}/window_scene/common:window_scene_common", 73 "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager", 74 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 75 "${window_base_path}/window_scene/screen_session_manager:screen_session_manager_client", 76 "${window_base_path}/window_scene/session:screen_session", 77 ] 78 79 external_deps = [ 80 "ability_base:base", 81 "ability_base:session_info", 82 "ability_base:want", 83 "ability_runtime:ability_start_setting", 84 "ability_runtime:process_options", 85 "c_utils:utils", 86 "eventhandler:libeventhandler", 87 "ffrt:libffrt", 88 "graphic_2d:librender_service_client", 89 "hilog:libhilog", 90 "hisysevent:libhisysevent", 91 "hitrace:hitrace_meter", 92 "image_framework:image_native", 93 "init:libbegetutil", 94 "input:libmmi-client", 95 "ipc:ipc_single", 96 "preferences:native_preferences", 97 ] 98 public_external_deps = [ 99 "accessibility:accessibility_common", 100 "accessibility:accessibility_interface", 101 "input:libmmi-napi", 102 ] 103 defines = [] 104 105 if (defined(global_parts_info) && 106 defined(global_parts_info.barrierfree_accessibility)) { 107 external_deps += [ "accessibility:accessibility_common" ] 108 } 109 110 if (defined(global_parts_info) && 111 defined(global_parts_info.powermgr_power_manager)) { 112 external_deps += [ "power_manager:powermgr_client" ] 113 defines += [ "POWER_MANAGER_ENABLE" ] 114 } 115 116 if (defined(global_parts_info) && 117 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 118 external_deps += [ "resource_schedule_service:ressched_client" ] 119 defines += [ "RES_SCHED_ENABLE" ] 120 } 121 122 if (device_status_enable) { 123 external_deps += [ "device_status:devicestatus_client" ] 124 defines += [ "DEVICE_STATUS_ENABLE" ] 125 } 126 127 if (!defined(global_parts_info) || 128 defined(global_parts_info.inputmethod_imf)) { 129 imf_enable = true 130 } else { 131 imf_enable = false 132 } 133 print("imf_enable: ", imf_enable) 134 if (imf_enable == true) { 135 external_deps += [ "imf:inputmethod_client" ] 136 defines += [ "IMF_ENABLE" ] 137 } 138 139 if (build_variant == "root") { 140 defines += [ "ACCESSIBILITY_DUMP_FOR_TEST" ] 141 } 142 143 innerapi_tags = [ "platformsdk" ] 144 part_name = "window_manager" 145 subsystem_name = "window" 146 147 if (build_variant == "user") { 148 defines += [ "IS_RELEASE_VERSION" ] 149 } 150} 151 152ohos_shared_library("screen_session") { 153 branch_protector_ret = "pac_ret" 154 sanitize = { 155 cfi = true 156 cfi_cross_dso = true 157 cfi_vcall_icall_only = true 158 debug = false 159 } 160 sources = [ 161 "screen/src/screen_property.cpp", 162 "screen/src/screen_session.cpp", 163 ] 164 165 public_configs = [ ":session_public_config" ] 166 167 deps = [ 168 "${window_base_path}/utils:libwmutil", 169 "${window_base_path}/utils:libwmutil_base", 170 ] 171 172 external_deps = [ 173 "c_utils:utils", 174 "graphic_2d:librender_service_client", 175 "hicollie:libhicollie", 176 "hilog:libhilog", 177 "hisysevent:libhisysevent", 178 "hitrace:hitrace_meter", 179 "init:libbegetutil", 180 ] 181 public_external_deps = [ 182 "accessibility:accessibility_common", 183 "input:libmmi-napi", 184 ] 185 186 innerapi_tags = [ "platformsdk" ] 187 part_name = "window_manager" 188 subsystem_name = "window" 189} 190