# 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") config("drm_capi_common_config") { include_dirs = [ "./common", "./include", "./../../../../interfaces/inner_api/native/drm", "./../../../../services/utils/include", ] cflags = [ "-fno-exceptions", "-Wall", "-fno-common", "-fstack-protector-all", "-Wshadow", "-FPIC", "-FS", "-D_FORTIFY_SOURCE=2", "-Wformat=2", "-Wdate-time", "-fdata-sections", "-ffunction-sections", "-fno-asynchronous-unwind-tables", "-fno-unwind-tables", "-Os", ] cflags_cc = [ "-std=c++17", "-fno-rtti", ] } config("drm_capi_common_public_config") { include_dirs = [ "./common", "./include", "./../../../../interfaces/inner_api/native/drm", "./../../../../services/utils/include", ] } ohos_shared_library("native_drm") { install_enable = true public_configs = [ ":drm_capi_common_public_config" ] configs = [ ":drm_capi_common_config" ] sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false } sources = [ "./../../../../frameworks/c/drm_capi/native_mediakeysession.cpp", "./../../../../frameworks/c/drm_capi/native_mediakeysystem.cpp", "./../../../../services/utils/drm_api_operation.cpp", ] deps = [ "./../../../../frameworks/native:drm_framework" ] external_deps = [ "c_utils:utils", "hiappevent:hiappevent_innerapi", "hilog:libhilog", "hitrace:libhitracechain", "ipc:ipc_core", ] innerapi_tags = [ "ndk" ] output_extension = "so" subsystem_name = "multimedia" part_name = "drm_framework" }