提交 eff951bd authored 作者: tobyfan1980's avatar tobyfan1980

add compile steps to readme

上级 7bbcd69a
......@@ -31,20 +31,37 @@ source /root/setenv.sh
- 可以直接到 github 中按照依赖库的名字搜索. 下载 latest release 的 zip 包到任意路径, 然后按照github 仓库中的 readme 进行编译和安装.
- 这里需要注意的是, 如果宿主机是 windows 或者 mac, mount 到虚拟机中的路径不支持创建 symlink. 所以不能下载到 mount 的路径下编译. 需要copy 到虚拟机中的其他目录.
编译完成之后再把 lib 和 include 里的内容 copy 到 相应的路径中, 例如vendor/hi3518/include
- 指定安装路径的方法是指定 cmake 的参数 -DCMAKE_INSTALL_PREFIX 例如
-
- 指定安装路径的方法是指定 cmake 的参数 -DCMAKE_INSTALL_PREFIX 下面以 fmt 为例
```
mkdir build
mkdir /root/build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/root/build ..
# 下载 fmt,
wget https://github.com/fmtlib/fmt/releases/download/7.0.1/fmt-7.0.1.zip
unzip -d fmtxxxxx.zip
cd fmt
# 创建 install 目录
mkdir /root/fmt_build
cmake -DCMAKE_INSTALL_PREFIX=/root/fmt_build .
make install
## copy inlude 和 lib 中的内容
cd /root/fmt_build
cp /root/fmt_build/include/ -r <source_path>/vendor/hi3518/include/
cp /root/fmt_build/lib/ -r -r <source_path>/vendor/hi3518/lib/
```
当使用 linux 的时候可以直接设置-DCMAKE_INSTALL_PREFIX 为
- hi3518用到的库的安装路径是 <source_path>/vendor/hi3518
- server用到的库的安装路径是 <source_path>/vendor/x64
以下是所有依赖的 github 列表
* fmt: https://github.com/fmtlib/fmt/releases/download/7.0.1/fmt-7.0.1.zip
* zmq: https://github.com/zeromq/libzmq/releases/tag/v4.3.2
* jsoncons: https://github.com/danielaparker/jsoncons/releases/tag/v0.154.3
* spdlog: https://github.com/gabime/spdlog/releases/tag/v1.7.0
* mqtt.c: https://github.com/eclipse/paho.mqtt.c/releases/tag/v1.3.4
### 编译
- evcamera
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论