1# Copyright (c) 2023 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. 13 14import("//build/ohos.gni") 15 16config("drm_capi_common_config") { 17 include_dirs = [ 18 "./common", 19 "./include", 20 "./../../../../interfaces/inner_api/native/drm", 21 "./../../../../services/utils/include", 22 ] 23 cflags = [ 24 "-fno-exceptions", 25 "-Wall", 26 "-fno-common", 27 "-fstack-protector-all", 28 "-Wshadow", 29 "-FPIC", 30 "-FS", 31 "-O2", 32 "-D_FORTIFY_SOURCE=2", 33 "-Wformat=2", 34 "-Wdate-time", 35 ] 36 37 cflags_cc = [ 38 "-std=c++17", 39 "-fno-rtti", 40 ] 41} 42 43ohos_shared_library("native_drm") { 44 install_enable = true 45 configs = [ ":drm_capi_common_config" ] 46 47 sanitize = { 48 cfi = true 49 cfi_cross_dso = true 50 debug = false 51 } 52 53 sources = [ 54 "./../../../../frameworks/c/drm_capi/native_mediakeysession.cpp", 55 "./../../../../frameworks/c/drm_capi/native_mediakeysystem.cpp", 56 ] 57 58 deps = [ "./../../../../frameworks/native:drm_framework" ] 59 60 external_deps = [ 61 "c_utils:utils", 62 "hilog:libhilog", 63 "hitrace:hitrace_meter", 64 "ipc:ipc_core", 65 ] 66 innerapi_tags = [ "ndk" ] 67 output_extension = "so" 68 subsystem_name = "multimedia" 69 part_name = "drm_framework" 70} 71