# Copyright (c) 2023 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") import("//build/ohos/ace/ace.gni") js_declaration("drm_js") { part_name = "drm_framework" sources = [ "./@ohos.multimedia.drm.d.ts" ] } ohos_copy("drm_declaration") { sources = [ "./@ohos.multimedia.drm.d.ts" ] outputs = [ target_out_dir + "/$target_name/" ] module_source_dir = target_out_dir + "/$target_name" module_install_name = "" part_name = "drm_framework" subsystem_name = "multimedia" } ohos_shared_library("drm_napi") { include_dirs = [ "./../../../../frameworks/js/drm_napi", "./../../../../frameworks/native/drm", "./../../../../frameworks/native/common", "./../../../../interfaces/inner_api/native/drm", "./../../../../interfaces/kits/js/drm_napi/include", "./../../../../services/drm_service/", "./../../../../services/drm_service/client/include", "./../../../../services/drm_service/server/include", "./../../../../services/drm_service/ipc", "./../../../../services/utils/include", "//foundation//arkui/napi/interfaces/kits", ] sources = [ "./../../../../frameworks/js/drm_napi/drm_enum_napi.cpp", "./../../../../frameworks/js/drm_napi/drm_error_code.cpp", "./../../../../frameworks/js/drm_napi/key_session_callback_napi.cpp", "./../../../../frameworks/js/drm_napi/key_session_napi.cpp", "./../../../../frameworks/js/drm_napi/media_key_system_callback_napi.cpp", "./../../../../frameworks/js/drm_napi/media_key_system_napi.cpp", "./../../../../frameworks/js/drm_napi/napi_async_work.cpp", "./../../../../frameworks/js/drm_napi/napi_param_utils.cpp", "./../../../../frameworks/js/drm_napi/native_module_ohos_drm.cpp", "./../../../../services/utils/drm_api_operation.cpp", ] deps = [ "./../../../../frameworks/native:drm_framework" ] external_deps = [ "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", "c_utils:utils", "hiappevent:hiappevent_innerapi", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:libhitracechain", "ipc:ipc_core", "napi:ace_napi", ] sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false } cflags = [ "-fPIC", "-fdata-sections", "-ffunction-sections", "-fno-asynchronous-unwind-tables", "-fno-unwind-tables", "-Os", ] cflags_cc = cflags relative_install_dir = "module/multimedia" part_name = "drm_framework" subsystem_name = "multimedia" }