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. 13import("//build/ohos.gni") 14 15ohos_shared_library("drm_service") { 16 install_enable = true 17 18 include_dirs = [ 19 "./client/include", 20 "./server/include", 21 "./server/include/v1_0", 22 "./ipc", 23 "./../../interfaces/inner_api/native", 24 "./../../interfaces/inner_api/native/drm", 25 "./../utils/include", 26 "//foundation//arkui/napi/interfaces/kits", 27 ] 28 29 sources = [ 30 "./client/src/key_session_service_callback_proxy.cpp", 31 "./client/src/mediakeysystem_service_callback_proxy.cpp", 32 "./server/src/drm_host_manager.cpp", 33 "./server/src/key_session_service.cpp", 34 "./server/src/key_session_service_stub.cpp", 35 "./server/src/media_decrypt_module_service.cpp", 36 "./server/src/media_decrypt_module_service_stub.cpp", 37 "./server/src/mediakeysystem_service.cpp", 38 "./server/src/mediakeysystem_service_stub.cpp", 39 "./server/src/mediakeysystemfactory_service.cpp", 40 "./server/src/mediakeysystemfactory_service_stub.cpp", 41 ] 42 43 external_deps = [ 44 "ability_base:want", 45 "ability_runtime:abilitykit_native", 46 "ability_runtime:napi_base_context", 47 "access_token:libaccesstoken_sdk", 48 "access_token:libprivacy_sdk", 49 "bundle_framework:appexecfwk_base", 50 "bundle_framework:appexecfwk_core", 51 "c_utils:utils", 52 "drivers_interface_drm:libdrm_proxy_1.0", 53 "hdf_core:libhdf_host", 54 "hdf_core:libhdf_ipc_adapter", 55 "hdf_core:libhdf_utils", 56 "hdf_core:libhdi", 57 "hicollie:libhicollie", 58 "hilog:libhilog", 59 "hisysevent:libhisysevent", 60 "hitrace:hitrace_meter", 61 "ipc:ipc_core", 62 "ipc:ipc_single", 63 "napi:ace_napi", 64 "safwk:system_ability_fwk", 65 "samgr:samgr_proxy", 66 ] 67 68 cflags = [ 69 "-Wall", 70 "-fPIC", 71 ] 72 if (target_cpu == "arm") { 73 cflags += [ "-DBINDER_IPC_32BIT" ] 74 } 75 76 sanitize = { 77 cfi = true 78 cfi_cross_dso = true 79 debug = false 80 } 81 82 if (use_musl) { 83 if (use_jemalloc && use_jemalloc_dfx_intf) { 84 cflags += [ "-DCONFIG_USE_JEMALLOC_DFX_INTF" ] 85 } 86 } 87 88 cflags_cc = cflags 89 90 subsystem_name = "multimedia" 91 part_name = "drm_framework" 92} 93