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 27 include_dirs = [ 28 "include", 29 "${component_path}/interfaces/inner_api", 30 "${component_path}/frameworks/core/common/include", 31 ] 32 33 if (!defined(defines)) { 34 defines = [] 35 } 36 37 use_exceptions = true 38 39 if (product_name != "ohos-sdk") { 40 deps = [ "${frameworks_module_ans_path}:ans_innerkits" ] 41 external_deps = [ 42 "ability_base:want", 43 "ability_base:zuri", 44 "ability_runtime:ability_manager", 45 "ability_runtime:abilitykit_native", 46 "ability_runtime:data_ability_helper", 47 "c_utils:utils", 48 "hilog:libhilog", 49 "image_framework:cj_image_ffi", 50 "ipc:ipc_core", 51 "napi:ace_napi", 52 "napi:cj_bind_ffi", 53 "napi:cj_bind_native", 54 ] 55 sources = [ 56 "src/inner_errors.cpp", 57 "src/notification_manager_ffi.cpp", 58 "src/notification_manager_impl.cpp", 59 ] 60 } else { 61 defines += [ "PREVIEWER" ] 62 sources = [ "src/notification_manager_mock.cpp" ] 63 } 64 65 if (current_os == "ohos") { 66 defines += [ "OHOS_PLATFORM" ] 67 } 68 69 if (current_os == "mingw") { 70 defines += [ "WINDOWS_PLATFORM" ] 71 } 72 73 innerapi_tags = [ "platformsdk" ] 74 subsystem_name = "${subsystem_name}" 75 part_name = "${component_name}" 76} 77