Android跨平台编译 —— libevent
此文大量引用参考 https://www.dplord.com/2017/10/10/android-ndk-compile-libevent/ 前言 前言都在 Android跨平台编译 —— BOOST PS:有一些基础知识介绍,还是挺重要的。 准备工作 编译环境 mac os x ndk版本 ndk 16rb libevent版本 2.1.8 编译工具 cmake 假设我们已经在android studio上安装了ndk和cmake。 首先需要下载libevent ,这里有个问题,如果直接从官网上下载tar包,解压之后是没有CMakeLists.txt文件的,所以无法使用cmake进行编译。所以我们需要从github上直接下载,地址 https://github.com/libevent/libevent 去clone下来,然后checkout到 release-2.1.8-stable 这个tag上。 环境已经准备就绪。 编译 步骤1 首先打开根目录下的CMakeLists.txt文件,有几处改动 diff --git a/CMakeLists.txt b/CMakeLists.txt index b4a34f3d..c32721d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ option(EVENT__BUILD_SHARED_LIBRARIES "Define if libevent should be built with shared libraries instead of...
评论
发表评论