libevent主要是用C语言实现了事件通知的功能
下载安装
直接在OpenHarmony-SIG仓中搜索libevent并下载。
使用说明
以OpenHarmony 3.1 Beta的rk3568版本为例
-
库代码存放路径:./third_party/libevent
-
修改添加依赖的编译脚本
在/developtools/bytrace_standard/ohos.build文件中添加修改 “//third_party/libevent:libevent_targets”,“//third_party/libevent:libevent_test”
{
"subsystem": "developtools",
"parts": {
"bytrace_standard": {
"module_list": [
"//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core",
"//developtools/bytrace_standard/bin:bytrace_target",
"//developtools/bytrace_standard/bin:bytrace.cfg",
"//developtools/bytrace_standard/interfaces/kits/js/napi:bytrace",
"//third_party/libevent:libevent_targets",
"//third_par