1# Copyright (c) 2021-2022 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") 15 16## Build snapshot {{{ 17config("snapshot_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20} 21 22ohos_executable("snapshot_display") { 23 branch_protector_ret = "pac_ret" 24 sanitize = { 25 cfi = true 26 cfi_cross_dso = true 27 cfi_vcall_icall_only = true 28 debug = false 29 } 30 install_enable = true 31 sources = [ "src/snapshot_display.cpp" ] 32 33 configs = [ 34 ":snapshot_config", 35 "../resources/config/build:coverage_flags", 36 ] 37 38 deps = [ 39 ":libsnapshot_util", 40 "../dm:libdm", 41 ] 42 43 external_deps = [ 44 "c_utils:utils", 45 "image_framework:image_native", 46 "init:libbegetutil", 47 ] 48 49 part_name = "window_manager" 50 subsystem_name = "window" 51} 52 53ohos_shared_library("libsnapshot_util") { 54 branch_protector_ret = "pac_ret" 55 sanitize = { 56 cfi = true 57 cfi_cross_dso = true 58 cfi_vcall_icall_only = true 59 debug = false 60 } 61 sources = [ "src/snapshot_utils.cpp" ] 62 63 configs = [ 64 ":snapshot_config", 65 "../resources/config/build:coverage_flags", 66 ] 67 68 deps = [ "../dm:libdm" ] 69 70 external_deps = [ 71 "c_utils:utils", 72 "hitrace:hitrace_meter", 73 "image_framework:image_native", 74 "libjpeg-turbo:turbojpeg", 75 ] 76 77 part_name = "window_manager" 78 subsystem_name = "window" 79} 80 81## Build snapshot }}} 82 83group("test") { 84 testonly = true 85 deps = [ "test:test" ] 86} 87