1# Copyright (c) 2021-2022 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/common_event_service/event.gni") 15import("//build/ohos.gni") 16 17cflags = [] 18 19config("cesfwk_ndk_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "${ces_innerkits_path}", 24 "${ces_ndk_path}/include", 25 ] 26 27 if (target_cpu == "arm") { 28 cflags += [ "-DBINDER_IPC_32BIT" ] 29 } 30} 31 32config("cesfwk_ndk_public_config") { 33 visibility = [ ":*" ] 34 35 include_dirs = [ "${ces_ndk_path}/include" ] 36} 37 38ohos_shared_library("ohcommonevent") { 39 sanitize = { 40 integer_overflow = true 41 ubsan = true 42 boundary_sanitize = true 43 cfi = true 44 cfi_cross_dso = true 45 debug = false 46 } 47 branch_protector_ret = "pac_ret" 48 49 configs = [ ":cesfwk_ndk_config" ] 50 51 public_configs = [ ":cesfwk_ndk_public_config" ] 52 53 sources = [ 54 "src/oh_commonevent.cpp", 55 "src/oh_commonevent_parameters_parse.cpp", 56 "src/oh_commonevent_wrapper.cpp", 57 ] 58 59 deps = [ 60 "${ces_core_path}:cesfwk_core", 61 "${ces_native_path}:cesfwk_innerkits", 62 ] 63 64 external_deps = [ 65 "ability_base:base", 66 "ability_base:want", 67 "ability_runtime:ability_manager", 68 "ability_runtime:abilitykit_native", 69 "ability_runtime:napi_base_context", 70 "c_utils:utils", 71 "hilog:libhilog", 72 ] 73 output_extension = "so" 74 innerapi_tags = [ "ndk" ] 75 subsystem_name = "notification" 76 part_name = "common_event_service" 77} 78