1# Copyright (c) 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") 15import("../config.gni") 16 17openssl_dir = "//third_party/openssl" 18config("avsession_utils_config") { 19 include_dirs = [ "include" ] 20} 21 22ohos_shared_library("avsession_utils") { 23 install_enable = true 24 sanitize = { 25 cfi = true 26 cfi_cross_dso = true 27 debug = false 28 blocklist = "../cfi_blocklist.txt" 29 } 30 sources = [ 31 "src/avsession_event_handler.cpp", 32 "src/avsession_sysevent.cpp", 33 "src/hash_calculator.cpp", 34 ] 35 36 include_dirs = [ 37 "./../interfaces/inner_api/native/session/include", 38 "$openssl_dir/include/", 39 ] 40 41 public_configs = [ ":avsession_utils_config" ] 42 43 deps = [ "//third_party/openssl:libcrypto_shared" ] 44 45 external_deps = [ 46 "c_utils:utils", 47 "eventhandler:libeventhandler", 48 "hilog:libhilog", 49 ] 50 51 cflags = [] 52 53 if (multimedia_av_session_enable_trace_control) { 54 cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ] 55 external_deps += [ "hitrace:hitrace_meter" ] 56 } 57 if (multimedia_av_session_enable_sysevent_control) { 58 cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ] 59 external_deps += [ "hisysevent:libhisysevent" ] 60 } 61 62 subsystem_name = "multimedia" 63 innerapi_tags = [ "platformsdk" ] 64 part_name = "av_session" 65 defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] 66} 67