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("//build/ohos.gni") 15 16ohos_shared_library("cj_hiappevent_ffi") { 17 defines = [] 18 include_dirs = [ 19 "include/", 20 "../../../frameworks/native/libhiappevent/include/", 21 "../../../frameworks/native/libhiappevent/observer/include/", 22 "../../../interfaces/native/inner_api/include/", 23 "../../../frameworks/native/libhiappevent/load/include/", 24 "../../../frameworks/native/libhiappevent/utility/include/", 25 ] 26 27 if (build_ohos_sdk) { 28 defines += [ "PREVIEWER" ] 29 sources = [ "src/hiappevent_mock.cpp" ] 30 } else { 31 sources = [ 32 "./src/appevent_packageholder_impl.cpp", 33 "./src/appevent_watcher_impl.cpp", 34 "./src/error.cpp", 35 "./src/hiappevent_ffi.cpp", 36 "./src/hiappevent_impl.cpp", 37 ] 38 } 39 40 deps = [ 41 "../../native/libhiappevent:libhiappevent_base", 42 "../../native/libhiappevent/cache:hiappevent_cache", 43 "../../native/libhiappevent/cleaner:hiappevent_cleaner", 44 "../../native/libhiappevent/observer:hiappevent_observer", 45 ] 46 47 external_deps = [ 48 "ffrt:libffrt", 49 "hilog:libhilog", 50 "napi:ace_napi", 51 "napi:cj_bind_ffi", 52 "napi:cj_bind_native", 53 "relational_store:native_rdb", 54 ] 55 56 innerapi_tags = [ "platformsdk" ] 57 58 part_name = "hiappevent" 59 subsystem_name = "hiviewdfx" 60} 61