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("window_scene_common_public_config") { 18 include_dirs = [ 19 "include", 20 "${window_base_path}/window_scene", 21 "${window_base_path}/interfaces/include", 22 23 # for window_manager_hilog 24 "${window_base_path}/utils/include", 25 "${window_base_path}/interfaces/innerkits/wm", 26 "${window_base_path}/interfaces/innerkits/dm", 27 "${window_base_path}/interfaces/innerkits/extension", 28 ] 29} 30 31## Build libwindow_scene_common.so 32ohos_shared_library("window_scene_common") { 33 branch_protector_ret = "pac_ret" 34 sanitize = { 35 cfi = true 36 cfi_cross_dso = true 37 cfi_vcall_icall_only = true 38 debug = false 39 } 40 sources = [ 41 "src/extension_data_handler.cpp", 42 "src/session_permission.cpp", 43 "src/task_scheduler.cpp", 44 "src/window_session_property.cpp", 45 ] 46 47 public_configs = [ ":window_scene_common_public_config" ] 48 49 deps = [ "${window_base_path}/utils:libwmutil_base" ] 50 51 external_deps = [ 52 "ability_runtime:app_manager", 53 "access_token:libaccesstoken_sdk", 54 "access_token:libtokenid_sdk", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "eventhandler:libeventhandler", 59 "hilog:libhilog", 60 "hitrace:hitrace_meter", 61 "image_framework:image_native", 62 "init:libbegetutil", 63 "input:libmmi-client", 64 "ipc:ipc_core", 65 "ipc:ipc_single", 66 "samgr:samgr_proxy", 67 ] 68 69 defines = [] 70 imf_enable = true 71 if (defined(global_parts_info) && !defined(global_parts_info.inputmethod_imf)) { 72 imf_enable = false 73 } 74 print("window_scene_common imf_enable: ", imf_enable) 75 if (imf_enable) { 76 external_deps += [ "imf:inputmethod_client" ] 77 defines += [ "IMF_ENABLE" ] 78 } 79 80 innerapi_tags = [ "platformsdk_indirect" ] 81 part_name = "window_manager" 82 subsystem_name = "window" 83 84 if (build_variant == "user") { 85 defines += [ "IS_RELEASE_VERSION" ] 86 } 87} 88