1# Copyright (c) 2021 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("//foundation/graphic/graphic_2d/graphic_config.gni") 16import("../render_service_base/config.gni") 17 18## Build libframe_analyzer.so {{{ 19config("libframe_analyzer_config") { 20 visibility = [ ":*" ] 21 22 cflags = [ 23 "-Wall", 24 "-Werror", 25 "-g3", 26 ] 27 28 if (current_os != "ohos") { 29 cflags += [ 30 "-Wno-c++17-extensions", 31 "-Wno-unused-private-field", 32 ] 33 } 34} 35 36config("libframe_analyzer_public_config") { 37 include_dirs = [ "export" ] 38} 39 40ohos_shared_library("libframe_analyzer") { 41 branch_protector_ret = "pac_ret" 42 if (current_os == "ohos") { 43 sources = [ 44 "src/frame_collector.cpp", 45 "src/frame_painter.cpp", 46 "src/frame_saver.cpp", 47 ] 48 49 include_dirs = [ "$graphic_2d_root/utils/sandbox" ] 50 51 deps = [ "../../../utils/sandbox:sandbox_utils" ] 52 53 external_deps = [ 54 "c_utils:utils", 55 "hilog:libhilog", 56 "hitrace:hitrace_meter", 57 "init:libbeget_proxy", 58 "init:libbegetutil", 59 "skia:skia_canvaskit", 60 ] 61 } else { 62 sources = [ 63 "src/mingw/frame_collector.cpp", 64 "src/mingw/frame_painter.cpp", 65 ] 66 } 67 68 if (defined(use_rosen_drawing) && use_rosen_drawing) { 69 defines = [ "USE_ROSEN_DRAWING" ] 70 deps += [ "$rosen_root/modules/2d_graphics:2d_graphics" ] 71 } 72 73 configs = [ ":libframe_analyzer_config" ] 74 75 public_configs = [ ":libframe_analyzer_public_config" ] 76 77 subsystem_name = "graphic" 78 part_name = "graphic_2d" 79} 80## Build libframe_analyzer.so }}} 81