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/multi_instance_manager.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_client:screen_session_manager_client", 77 "${window_base_path}/window_scene/session:screen_session", 78 ] 79 80 external_deps = [ 81 "ability_runtime:ability_start_setting", 82 "ability_runtime:process_options", 83 "ability_runtime:start_window_option", 84 "bundle_framework:appexecfwk_base", 85 "bundle_framework:appexecfwk_core", 86 "c_utils:utils", 87 "eventhandler:libeventhandler", 88 "ffrt:libffrt", 89 "graphic_2d:librender_service_client", 90 "hilog:libhilog", 91 "hisysevent:libhisysevent", 92 "hitrace:hitrace_meter", 93 "image_framework:image_native", 94 "init:libbegetutil", 95 "input:libmmi-client", 96 "ipc:ipc_single", 97 ] 98 if (!(host_os == "linux" && host_cpu == "arm64")) { 99 external_deps += [ "preferences:native_preferences" ] 100 } 101 public_external_deps = [ 102 "ability_base:base", 103 "ability_base:session_info", 104 "ability_base:want", 105 "accessibility:accessibility_common", 106 "accessibility:accessibility_interface", 107 "input:libmmi-napi", 108 ] 109 defines = [] 110 111 if (defined(global_parts_info) && 112 defined(global_parts_info.barrierfree_accessibility)) { 113 external_deps += [ "accessibility:accessibility_common" ] 114 } 115 116 if (defined(global_parts_info) && 117 defined(global_parts_info.powermgr_power_manager)) { 118 external_deps += [ "power_manager:powermgr_client" ] 119 defines += [ "POWER_MANAGER_ENABLE" ] 120 } 121 122 if (defined(global_parts_info) && 123 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 124 external_deps += [ "resource_schedule_service:ressched_client" ] 125 defines += [ "RES_SCHED_ENABLE" ] 126 } 127 128 if (device_status_enable) { 129 external_deps += [ "device_status:devicestatus_client" ] 130 defines += [ "DEVICE_STATUS_ENABLE" ] 131 } 132 133 if (!defined(global_parts_info) || 134 defined(global_parts_info.inputmethod_imf)) { 135 imf_enable = true 136 } else { 137 imf_enable = false 138 } 139 print("imf_enable: ", imf_enable) 140 if (imf_enable == true) { 141 external_deps += [ "imf:inputmethod_client" ] 142 defines += [ "IMF_ENABLE" ] 143 } 144 145 if (build_variant == "root") { 146 defines += [ "ACCESSIBILITY_DUMP_FOR_TEST" ] 147 } 148 149 innerapi_tags = [ "platformsdk" ] 150 part_name = "window_manager" 151 subsystem_name = "window" 152 153 if (build_variant == "user") { 154 defines += [ "IS_RELEASE_VERSION" ] 155 } 156} 157 158ohos_shared_library("screen_session") { 159 branch_protector_ret = "pac_ret" 160 sanitize = { 161 cfi = true 162 cfi_cross_dso = true 163 cfi_vcall_icall_only = true 164 debug = false 165 } 166 sources = [ 167 "screen/src/screen_property.cpp", 168 "screen/src/screen_session.cpp", 169 ] 170 171 public_configs = [ ":session_public_config" ] 172 173 deps = [ 174 "${window_base_path}/utils:libwmutil", 175 "${window_base_path}/utils:libwmutil_base", 176 ] 177 178 external_deps = [ 179 "c_utils:utils", 180 "graphic_2d:librender_service_client", 181 "hicollie:libhicollie", 182 "hilog:libhilog", 183 "hisysevent:libhisysevent", 184 "hitrace:hitrace_meter", 185 "init:libbegetutil", 186 ] 187 public_external_deps = [ 188 "ability_base:base", 189 "ability_base:want", 190 "accessibility:accessibility_common", 191 "input:libmmi-napi", 192 ] 193 194 innerapi_tags = [ "platformsdk" ] 195 part_name = "window_manager" 196 subsystem_name = "window" 197} 198