• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 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
17config("avsession_utils_config") {
18  include_dirs = [ "include" ]
19}
20
21ohos_shared_library("avsession_utils") {
22  install_enable = true
23  sanitize = {
24    cfi = true
25    cfi_cross_dso = true
26    debug = false
27  }
28  sources = [
29    "src/avsession_dynamic_loader.cpp",
30    "src/avsession_event_handler.cpp",
31    "src/avsession_radar.cpp",
32    "src/avsession_sysevent.cpp",
33    "src/hash_calculator.cpp",
34    "src/permission_checker.cpp",
35  ]
36
37  include_dirs = [
38    "./../interfaces/inner_api/native/session/include",
39  ]
40
41  public_configs = [ ":avsession_utils_config" ]
42
43  external_deps = [
44    "access_token:libaccesstoken_sdk",
45    "access_token:libtokenid_sdk",
46    "access_token:libtokensetproc_shared",
47    "bundle_framework:appexecfwk_base",
48    "bundle_framework:appexecfwk_core",
49    "cJSON:cjson",
50    "c_utils:utils",
51    "device_manager:devicemanagersdk",
52    "eventhandler:libeventhandler",
53    "hilog:libhilog",
54    "ipc:ipc_single",
55    "openssl:libcrypto_shared",
56    "samgr:samgr_proxy",
57  ]
58
59  cflags = []
60
61  if (multimedia_av_session_enable_trace_control) {
62    cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ]
63    external_deps += [ "hitrace:hitrace_meter" ]
64  }
65  if (multimedia_av_session_enable_sysevent_control) {
66    cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ]
67    external_deps += [ "hisysevent:libhisysevent" ]
68  }
69
70  subsystem_name = "multimedia"
71  innerapi_tags = [ "platformsdk" ]
72  part_name = "av_session"
73  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
74  if (use_libfuzzer || use_clang_coverage) {
75    defines += [ "TEST_COVERAGE" ]
76  }
77}
78