• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-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
14# for ohos_shared_library("drm_framework")
15
16import("//build/ohos.gni")
17import("//foundation/multimedia/drm_framework/config.gni")
18
19config("drm_framework_public_config") {
20  include_dirs = [
21    "./../../interfaces/inner_api/native/drm",
22    "./../../services/drm_service",
23  ]
24}
25
26config("drm_framework_local_config") {
27  include_dirs = [
28    "./../../interfaces/inner_api/native/drm",
29    "./../../services/drm_service/client/include",
30    "./../../services/drm_service/ipc",
31    "./../../services/drm_service/server/include",
32    "./../../services/include",
33    "./../../services/utils",
34    "./../../services/utils/include",
35  ]
36}
37
38config("drm_framework_drivers_config") {
39  include_dirs = [ "$drm_framework_root_dir/services/drm_service/ipc" ]
40}
41
42ohos_shared_library("drm_framework") {
43  branch_protector_ret = "pac_ret"
44  install_enable = true
45  sources = [
46    "./../../services/drm_service/client/src/key_session_service_proxy.cpp",
47    "./../../services/drm_service/client/src/media_decrypt_module_service_proxy.cpp",
48    "./../../services/drm_service/client/src/mediakeysystem_service_proxy.cpp",
49    "./../../services/drm_service/client/src/mediakeysystemfactory_service_proxy.cpp",
50    "./../../services/drm_service/server/src/drm_listener_stub.cpp",
51    "./../../services/drm_service/server/src/key_session_service_callback_stub.cpp",
52    "./../../services/drm_service/server/src/mediakeysystem_service_callback_stub.cpp",
53    "./../../services/utils/drm_trace.cpp",
54    "./drm/key_session_impl.cpp",
55    "./drm/media_key_system_factory_impl.cpp",
56    "./drm/media_key_system_impl.cpp",
57  ]
58
59  cflags = [
60    "-fPIC",
61    "-Wall",
62    "-fdata-sections",
63    "-ffunction-sections",
64    "-fno-asynchronous-unwind-tables",
65    "-fno-unwind-tables",
66    "-Os",
67  ]
68
69  if (target_cpu == "arm") {
70    cflags += [ "-DBINDER_IPC_32BIT" ]
71  }
72  sanitize = {
73    cfi = true
74    cfi_cross_dso = true
75    cfi_vcall_icall_only = true
76    debug = false
77  }
78
79  public_configs = [
80    ":drm_framework_drivers_config",
81    ":drm_framework_local_config",
82    ":drm_framework_public_config",
83  ]
84
85  include_dirs = [ "./drm" ]
86
87  deps = [ ":drm_api_operation" ]
88
89  external_deps = [
90    "ability_runtime:abilitykit_native",
91    "ability_runtime:napi_base_context",
92    "c_utils:utils",
93    "hilog:libhilog",
94    "hisysevent:libhisysevent",
95    "hitrace:hitrace_meter",
96    "hitrace:libhitracechain",
97    "ipc:ipc_core",
98    "napi:ace_napi",
99    "safwk:system_ability_fwk",
100    "samgr:samgr_proxy",
101  ]
102
103  cflags_cc = cflags
104  innerapi_tags = [ "platformsdk" ]
105  part_name = "drm_framework"
106  subsystem_name = "multimedia"
107}
108
109ohos_prebuilt_etc("drm_api_operation") {
110  source = "../../services/etc/drm_api_operation.cfg"
111  relative_install_dir = "drm"
112  part_name = "drm_framework"
113  subsystem_name = "multimedia"
114}
115