Files
2026-08-11 16:04:36 +08:00

107 lines
2.7 KiB
Plaintext

# Copyright (c) 2023-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.
# for ohos_shared_library("drm_framework")
import("//build/ohos.gni")
import("//foundation/multimedia/drm_framework/config.gni")
config("drm_framework_public_config") {
include_dirs = [
"./../../interfaces/inner_api/native/drm",
"./../../services/drm_service",
]
}
config("drm_framework_local_config") {
include_dirs = [
"./../../interfaces/inner_api/native/drm",
"./../../services/drm_service/server/include",
"./../../services/include",
"./../../services/utils",
"./../../services/utils/include",
]
}
ohos_shared_library("drm_framework") {
branch_protector_ret = "pac_ret"
install_enable = true
sources = [
"./../../services/utils/drm_trace.cpp",
"./drm/key_session_impl.cpp",
"./drm/media_key_system_factory_impl.cpp",
"./drm/media_key_system_impl.cpp",
]
cflags = [
"-fPIC",
"-Wall",
"-fdata-sections",
"-ffunction-sections",
"-fno-asynchronous-unwind-tables",
"-fno-unwind-tables",
"-Os",
]
if (target_cpu == "arm") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
sanitize = {
cfi = true
cfi_cross_dso = true
cfi_vcall_icall_only = true
debug = false
}
public_configs = [
":drm_framework_local_config",
":drm_framework_public_config",
"./../../services/drm_service/idls:drm_sa_idl_config",
]
include_dirs = [ "./drm" ]
deps = [
":drm_api_operation",
"./../../services/drm_service/idls:idl_sa_proxy",
]
external_deps = [
"ability_runtime:abilitykit_native",
"ability_runtime:napi_base_context",
"c_utils:utils",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"hitrace:libhitracechain",
"ipc:ipc_core",
"napi:ace_napi",
"node:node_header_notice",
"netmanager_base:net_conn_manager_if",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
cflags_cc = cflags
innerapi_tags = [ "platformsdk" ]
part_name = "drm_framework"
subsystem_name = "multimedia"
}
ohos_prebuilt_etc("drm_api_operation") {
source = "../../services/etc/drm_api_operation.cfg"
relative_install_dir = "drm"
part_name = "drm_framework"
subsystem_name = "multimedia"
}