1# Copyright (c) 2024 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_ffi_kit_config") { 18 include_dirs = [ "./" ] 19} 20 21ohos_shared_library("cj_window_ffi") { 22 branch_protector_ret = "pac_ret" 23 sanitize = { 24 cfi = true 25 cfi_cross_dso = true 26 debug = false 27 } 28 29 configs = [ "../../../../resources/config/build:coverage_flags" ] 30 31 public_configs = [ ":window_ffi_kit_config" ] 32 33 if (!build_ohos_sdk) { 34 sources = [ 35 "window_ffi.cpp", 36 "window_impl.cpp", 37 "window_listener.cpp", 38 "window_manager_impl.cpp", 39 "window_register_manager.cpp", 40 "window_stage_impl.cpp", 41 ] 42 deps = [ 43 "../../../../dm:libdm", 44 "../../../../utils:libwmutil", 45 "../../../../utils:libwmutil_base", 46 "../../../../wm:libwm", 47 ] 48 external_deps = [ 49 "ability_runtime:ability_context_native", 50 "ability_runtime:ability_manager", 51 "ability_runtime:abilitykit_native", 52 "ability_runtime:dialog_request_info", 53 "ability_runtime:extensionkit_native", 54 "ability_runtime:runtime", 55 "access_token:libaccesstoken_sdk", 56 "ace_engine:ace_uicontent", 57 "bundle_framework:appexecfwk_base", 58 "c_utils:utils", 59 "common_event_service:cesfwk_innerkits", 60 "eventhandler:libeventhandler", 61 "graphic_2d:librender_service_client", 62 "hilog:libhilog", 63 "hitrace:hitrace_meter", 64 "image_framework:cj_image_ffi", 65 "image_framework:image", 66 "image_framework:image_native", 67 "ipc:ipc_napi", 68 "ipc:ipc_single", 69 "napi:ace_napi", 70 "napi:cj_bind_ffi", 71 "napi:cj_bind_native", 72 ] 73 } else { 74 defines += [ "PREVIEWER" ] 75 sources = [ "window_mock.cpp" ] 76 external_deps = [ "napi:cj_bind_ffi" ] 77 } 78 innerapi_tags = [ "platformsdk" ] 79 part_name = "window_manager" 80 subsystem_name = "window" 81} 82