1# Copyright (c) 2021-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_manager_napi_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "window_napi", 22 "window_manager_napi", 23 "../../../innerkits/wm", 24 "../../../innerkits/dm", 25 "../../../../wm/include", 26 "../../../../utils/include", 27 ] 28} 29 30config("window_native_kit_config") { 31 visibility = [ ":*" ] 32 33 include_dirs = [ 34 "window_napi", 35 "../../../innerkits/wm", 36 "../../../innerkits/dm", 37 "../../../../utils/include", 38 "../../../../wm/include", 39 "../../../../wmserver/include", 40 ] 41} 42 43config("window_native_kit_public_config") { 44 visibility = [ ":*" ] 45 46 include_dirs = [ "window_napi" ] 47} 48 49ohos_shared_library("window_native_kit") { 50 branch_protector_ret = "pac_ret" 51 sanitize = { 52 cfi = true 53 cfi_cross_dso = true 54 cfi_vcall_icall_only = true 55 debug = false 56 } 57 sources = [ 58 "window_napi/js_transition_controller.cpp", 59 "window_napi/js_window.cpp", 60 "window_napi/js_window_listener.cpp", 61 "window_napi/js_window_register_manager.cpp", 62 "window_napi/js_window_utils.cpp", 63 ] 64 65 public_configs = [ ":window_native_kit_public_config" ] 66 67 configs = [ 68 ":window_native_kit_config", 69 "../../../../resources/config/build:coverage_flags", 70 ] 71 72 deps = [ 73 "../../../../utils:libwmutil", 74 "../../../../utils:libwmutil_base", 75 "../../../../wm:libwm", 76 ] 77 78 external_deps = [ 79 "ability_runtime:ability_manager", 80 "ability_runtime:dialog_request_info", 81 "ability_runtime:extensionkit_native", 82 "ability_runtime:runtime", 83 "access_token:libaccesstoken_sdk", 84 "ace_engine:ace_uicontent", 85 "bundle_framework:appexecfwk_base", 86 "c_utils:utils", 87 "eventhandler:libeventhandler", 88 "hilog:libhilog", 89 "hitrace:hitrace_meter", 90 "image_framework:image", 91 "image_framework:image_native", 92 "ipc:ipc_napi", 93 "ipc:ipc_single", 94 "napi:ace_napi", 95 ] 96 97 innerapi_tags = [ "platformsdk" ] 98 part_name = "window_manager" 99 subsystem_name = "window" 100 101 defines = [] 102 if (build_variant == "user") { 103 defines += [ "IS_RELEASE_VERSION" ] 104 } 105} 106 107ohos_shared_library("window_napi") { 108 branch_protector_ret = "pac_ret" 109 sanitize = { 110 cfi = true 111 cfi_cross_dso = true 112 cfi_vcall_icall_only = true 113 debug = false 114 } 115 sources = [ 116 "window_manager_napi/js_window_manager.cpp", 117 "window_manager_napi/window_manager_module.cpp", 118 ] 119 120 configs = [ 121 ":window_manager_napi_config", 122 "../../../../resources/config/build:coverage_flags", 123 ] 124 125 deps = [ 126 ":window_native_kit", 127 "../../../../dm:libdm", 128 "../../../../utils:libwmutil", 129 "../../../../utils:libwmutil_base", 130 "../../../../wm:libwm", 131 ] 132 133 external_deps = [ 134 "ability_runtime:ability_context_native", 135 "ability_runtime:abilitykit_native", 136 "ability_runtime:runtime", 137 "c_utils:utils", 138 "common_event_service:cesfwk_innerkits", 139 "graphic_2d:librender_service_client", 140 "hilog:libhilog", 141 "hitrace:hitrace_meter", 142 "image_framework:image", 143 "napi:ace_napi", 144 ] 145 146 relative_install_dir = "module" 147 148 part_name = "window_manager" 149 subsystem_name = "window" 150} 151 152ohos_shared_library("windowstage_kit") { 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 = [ "window_stage_napi/js_window_stage.cpp" ] 161 162 configs = [ 163 ":window_native_kit_config", 164 "../../../../resources/config/build:coverage_flags", 165 ] 166 167 include_dirs = [ "window_stage_napi" ] 168 deps = [ 169 ":window_native_kit", 170 "../../../../utils:libwmutil", 171 "../../../../utils:libwmutil_base", 172 "../../../../wm:libwm", 173 ] 174 175 external_deps = [ 176 "ability_runtime:runtime", 177 "c_utils:utils", 178 "hilog:libhilog", 179 "napi:ace_napi", 180 ] 181 182 innerapi_tags = [ "platformsdk" ] 183 part_name = "window_manager" 184 subsystem_name = "window" 185} 186