1# Copyright (C) 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. 13 14import("//base/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16 17ohos_shared_library("cj_notification_manager_ffi") { 18 sanitize = { 19 integer_overflow = true 20 ubsan = true 21 boundary_sanitize = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 28 include_dirs = [ 29 "include", 30 "${component_path}/interfaces/inner_api", 31 "${component_path}/frameworks/core/common/include", 32 ] 33 34 if (!defined(defines)) { 35 defines = [] 36 } 37 38 use_exceptions = true 39 40 if (product_name != "ohos-sdk") { 41 deps = [ "${frameworks_module_ans_path}:ans_innerkits" ] 42 external_deps = [ 43 "ability_base:want", 44 "ability_base:zuri", 45 "ability_runtime:ability_manager", 46 "ability_runtime:abilitykit_native", 47 "ability_runtime:data_ability_helper", 48 "c_utils:utils", 49 "hilog:libhilog", 50 "image_framework:cj_image_ffi", 51 "ipc:ipc_core", 52 "napi:ace_napi", 53 "napi:cj_bind_ffi", 54 "napi:cj_bind_native", 55 ] 56 sources = [ 57 "src/inner_errors.cpp", 58 "src/notification_manager_ffi.cpp", 59 "src/notification_manager_impl.cpp", 60 "src/notification_utils.cpp", 61 ] 62 } else { 63 defines += [ "PREVIEWER" ] 64 sources = [ "src/notification_manager_mock.cpp" ] 65 } 66 67 if (current_os == "ohos") { 68 defines += [ "OHOS_PLATFORM" ] 69 } 70 71 if (current_os == "mingw") { 72 defines += [ "WINDOWS_PLATFORM" ] 73 } 74 75 innerapi_tags = [ "platformsdk" ] 76 subsystem_name = "${subsystem_name}" 77 part_name = "${component_name}" 78} 79