• 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")
17
18config("drm_framework_public_config") {
19  include_dirs = [
20    "./../../interfaces/inner_api/native/drm",
21    "./../../services/drm_service",
22  ]
23}
24
25config("drm_framework_local_config") {
26  include_dirs = [
27    "./../../interfaces/inner_api/native/drm",
28    "./../../services/drm_service/client/include",
29    "./../../services/drm_service/ipc",
30    "./../../services/drm_service/server/include",
31    "./../../services/include",
32    "./../../services/utils/include",
33  ]
34}
35
36config("drm_framework_drivers_config") {
37  include_dirs = [ "./../../services/drm_service/ipc/" ]
38}
39
40ohos_shared_library("drm_framework") {
41  install_enable = true
42  sources = [
43    "./../../services/drm_service/client/src/key_session_service_proxy.cpp",
44    "./../../services/drm_service/client/src/media_decrypt_module_service_proxy.cpp",
45    "./../../services/drm_service/client/src/mediakeysystem_service_proxy.cpp",
46    "./../../services/drm_service/client/src/mediakeysystemfactory_service_proxy.cpp",
47    "./../../services/drm_service/server/src/key_session_service_callback_stub.cpp",
48    "./../../services/drm_service/server/src/mediakeysystem_service_callback_stub.cpp",
49    "./drm/key_session_impl.cpp",
50    "./drm/media_key_system_factory_impl.cpp",
51    "./drm/media_key_system_impl.cpp",
52  ]
53
54  cflags = [
55    "-fPIC",
56    "-Wall",
57  ]
58
59  if (target_cpu == "arm") {
60    cflags += [ "-DBINDER_IPC_32BIT" ]
61  }
62  sanitize = {
63    cfi = true
64    cfi_cross_dso = true
65    debug = false
66  }
67
68  public_configs = [
69    ":drm_framework_drivers_config",
70    ":drm_framework_local_config",
71    ":drm_framework_public_config",
72  ]
73
74  include_dirs = [
75    "./drm",
76    "//foundation//arkui/napi/interfaces/kits",
77  ]
78
79  deps = []
80
81  external_deps = [
82    "ability_runtime:abilitykit_native",
83    "ability_runtime:napi_base_context",
84    "c_utils:utils",
85    "hilog:libhilog",
86    "hisysevent:libhisysevent",
87    "hitrace:hitrace_meter",
88    "ipc:ipc_core",
89    "napi:ace_napi",
90    "safwk:system_ability_fwk",
91    "samgr:samgr_proxy",
92  ]
93
94  cflags_cc = cflags
95
96  part_name = "drm_framework"
97  subsystem_name = "multimedia"
98}
99