1# Copyright (c) 2025 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 17## Build cj_screenshot_ffi.so {{{ 18ohos_shared_library("cj_screenshot_ffi") { 19 branch_protector_ret = "pac_ret" 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 } 25 configs = [ "../../../../resources/config/build:coverage_flags" ] 26 27 if (!build_ohos_sdk) { 28 sources = [ 29 "cj_screenshot_module.cpp", 30 "screenshot_ffi.cpp", 31 ] 32 deps = [ 33 "../../../../dm:libdm", 34 "../../../../utils:libwmutil", 35 "../../../../utils:libwmutil_base", 36 ] 37 external_deps = [ 38 "hilog:libhilog", 39 "image_framework:cj_image_ffi", 40 "image_framework:image", 41 "image_framework:image_native", 42 "napi:ace_napi", 43 "napi:cj_bind_ffi", 44 "napi:cj_bind_native", 45 ] 46 } else { 47 defines += [ "PREVIEWER" ] 48 sources = [ "display_runtime_mock.cpp" ] 49 external_deps = [ "napi:cj_bind_ffi" ] 50 } 51 innerapi_tags = [ "platformsdk" ] 52 part_name = "window_manager" 53 subsystem_name = "window" 54} 55## Build cj_screenshot_ffi.so }}} 56