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