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") 15 16## Build libframe_analyzer.so {{{ 17config("libframe_analyzer_config") { 18 visibility = [ ":*" ] 19 20 cflags = [ 21 "-Wall", 22 "-Werror", 23 "-g3", 24 ] 25 26 if (current_os != "ohos") { 27 cflags += [ 28 "-Wno-c++17-extensions", 29 "-Wno-unused-private-field", 30 ] 31 } 32} 33 34config("libframe_analyzer_public_config") { 35 include_dirs = [ "export" ] 36} 37 38ohos_shared_library("libframe_analyzer") { 39 if (current_os == "ohos") { 40 sources = [ 41 "src/frame_collector.cpp", 42 "src/frame_painter.cpp", 43 "src/frame_saver.cpp", 44 ] 45 46 include_dirs = [ "//foundation/graphic/graphic_2d/utils/sandbox" ] 47 48 deps = [ 49 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 50 "//foundation/graphic/graphic_2d/utils/sandbox:sandbox_utils", 51 "//third_party/flutter/build/skia:ace_skia_ohos", 52 ] 53 54 external_deps = [ 55 "c_utils:utils", 56 "hitrace_native:hitrace_meter", 57 "init:libbeget_proxy", 58 "init:libbegetutil", 59 ] 60 } else { 61 sources = [ 62 "src/mingw/frame_collector.cpp", 63 "src/mingw/frame_painter.cpp", 64 ] 65 } 66 67 configs = [ ":libframe_analyzer_config" ] 68 69 public_configs = [ ":libframe_analyzer_public_config" ] 70 71 subsystem_name = "graphic" 72 part_name = "graphic_standard" 73} 74## Build libframe_analyzer.so }}} 75