1# Copyright (c) 2022-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("libwindow_extension_private_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "include", 22 "include/zidl", 23 "../extension_connection/include", 24 "../extension_connection/include/zidl", 25 "../../interfaces/kits/napi/window_runtime/window_napi", 26 "../../interfaces/innerkits/extension", 27 "../../interfaces/innerkits/wm", 28 "../../window_scene/interfaces/innerkits/include", 29 ] 30} 31 32## Build libwindow_extension.so 33ohos_shared_library("libwindow_extension") { 34 branch_protector_ret = "pac_ret" 35 sanitize = { 36 cfi = true 37 cfi_cross_dso = true 38 cfi_vcall_icall_only = true 39 debug = false 40 } 41 sources = [ 42 "../extension_connection/src/zidl/window_extension_client_proxy.cpp", 43 "src/js_window_extension.cpp", 44 "src/js_window_extension_context.cpp", 45 "src/window_extension.cpp", 46 "src/window_extension_context.cpp", 47 "src/window_extension_stub_impl.cpp", 48 "src/zidl/window_extension_stub.cpp", 49 ] 50 51 configs = [ 52 ":libwindow_extension_private_config", 53 "../../resources/config/build:coverage_flags", 54 ] 55 56 deps = [ 57 "${window_base_path}/utils:libwmutil", 58 "../../interfaces/kits/napi/window_runtime:window_native_kit", 59 "../../utils:libwmutil_base", 60 "../../window_scene/interfaces/innerkits:libwsutils", 61 "../../wm:libwm", 62 ] 63 64 external_deps = [ 65 "ability_base:want", 66 "ability_runtime:ability_connect_callback_stub", 67 "ability_runtime:ability_context_native", 68 "ability_runtime:ability_manager", 69 "ability_runtime:ability_start_options", 70 "ability_runtime:app_context", 71 "ability_runtime:extensionkit_native", 72 "ability_runtime:napi_common", 73 "ability_runtime:runtime", 74 "c_utils:utils", 75 "common_event_service:cesfwk_innerkits", 76 "eventhandler:libeventhandler", 77 "graphic_2d:librender_service_client", 78 "hilog:libhilog", 79 "hitrace:hitrace_meter", 80 "input:libmmi-client", 81 "ipc:ipc_single", 82 "napi:ace_napi", 83 ] 84 85 part_name = "window_manager" 86 subsystem_name = "window" 87 88 defines = [] 89 if (build_variant == "user") { 90 defines += [ "IS_RELEASE_VERSION" ] 91 } 92} 93 94config("window_extension_module_private_config") { 95 visibility = [ ":*" ] 96 97 include_dirs = [ "include" ] 98} 99 100## Build libwindow_extension_module.so 101ohos_shared_library("window_extension_module") { 102 branch_protector_ret = "pac_ret" 103 sanitize = { 104 cfi = true 105 cfi_cross_dso = true 106 cfi_vcall_icall_only = true 107 debug = false 108 } 109 sources = [ "src/window_extension_module_loader.cpp" ] 110 111 configs = [ 112 ":window_extension_module_private_config", 113 "../../resources/config/build:coverage_flags", 114 ] 115 116 deps = [ ":libwindow_extension" ] 117 118 external_deps = [ 119 "ability_runtime:ability_context_native", 120 "ability_runtime:abilitykit_native", 121 "common_event_service:cesfwk_innerkits", 122 "hilog:libhilog", 123 "napi:ace_napi", 124 ] 125 relative_install_dir = "extensionability/" 126 subsystem_name = "window" 127 part_name = "window_manager" 128} 129 130group("test") { 131 testonly = true 132 deps = [ "test:test" ] 133} 134