# 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. import("//build/ohos.gni") ohos_shared_library("drm_service") { install_enable = true include_dirs = [ "./client/include", "./server/include", "./server/include/v1_0", "./ipc", "./../../interfaces/inner_api/native", "./../../interfaces/inner_api/native/drm", "./../utils/include", "//foundation//arkui/napi/interfaces/kits", ] sources = [ "./client/src/key_session_service_callback_proxy.cpp", "./client/src/mediakeysystem_service_callback_proxy.cpp", "./server/src/drm_host_manager.cpp", "./server/src/key_session_service.cpp", "./server/src/key_session_service_stub.cpp", "./server/src/media_decrypt_module_service.cpp", "./server/src/media_decrypt_module_service_stub.cpp", "./server/src/mediakeysystem_service.cpp", "./server/src/mediakeysystem_service_stub.cpp", "./server/src/mediakeysystemfactory_service.cpp", "./server/src/mediakeysystemfactory_service_stub.cpp", ] external_deps = [ "ability_base:want", "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", "access_token:libaccesstoken_sdk", "access_token:libprivacy_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "drivers_interface_drm:libdrm_proxy_1.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", "ipc:ipc_single", "napi:ace_napi", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] cflags = [ "-Wall", "-fPIC", ] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } if (use_musl) { if (use_jemalloc && use_jemalloc_dfx_intf) { cflags += [ "-DCONFIG_USE_JEMALLOC_DFX_INTF" ] } } cflags_cc = cflags subsystem_name = "multimedia" part_name = "drm_framework" }