# Copyright (c) 2022-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../config.gni") openssl_dir = "//third_party/openssl" config("avsession_utils_config") { include_dirs = [ "include" ] } ohos_shared_library("avsession_utils") { install_enable = true sanitize = { cfi = true cfi_cross_dso = true debug = false } sources = [ "src/avsession_dynamic_loader.cpp", "src/avsession_event_handler.cpp", "src/avsession_radar.cpp", "src/avsession_sysevent.cpp", "src/hash_calculator.cpp", "src/permission_checker.cpp", ] include_dirs = [ "./../interfaces/inner_api/native/session/include", "$openssl_dir/include/", ] public_configs = [ ":avsession_utils_config" ] deps = [ "//third_party/openssl:libcrypto_shared" ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "access_token:libtokensetproc_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_single", "samgr:samgr_proxy", ] cflags = [] if (multimedia_av_session_enable_trace_control) { cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ] external_deps += [ "hitrace:hitrace_meter" ] } if (multimedia_av_session_enable_sysevent_control) { cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ] external_deps += [ "hisysevent:libhisysevent" ] } subsystem_name = "multimedia" innerapi_tags = [ "platformsdk" ] part_name = "av_session" defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] if (use_libfuzzer || use_clang_coverage) { defines += [ "TEST_COVERAGE" ] } }