瀏覽代碼

chore(readme): improved build instructions for cross-compiling

pull/169/head
Lucino772 2 年之前
父節點
當前提交
b4cb4b6d2d
共有 1 個文件被更改,包括 12 次插入4 次删除
  1. +12
    -4
      README.md

+ 12
- 4
README.md 查看文件

@@ -15,14 +15,11 @@ Build
-----

```shell
mdkir dist
cd dist
mdkir dist && cd dist
cmake ..
cmake --build .
```

*Note: You can also cross-compile using the `toolchain-rpi.cmake` file available in the `cmake/` directory. Run cmake with -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-rpi.cmake*

Debian package:
```shell
cpack -config CPackConfig.cmake
@@ -33,6 +30,17 @@ Build Archive:
cpack -config CPackSourceConfig.cmake
```

**Cross-Compiling:**

Make sure to install the [`arm toolchain`](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) for the raspberry pi.

Then set the environment variable `TOOLCHAIN_PATH` to the `bin/` directory in your toolchain and run:
```shell
mkdir dist && cd dist
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-rpi.cmake
cmake --build .
```

Install
-------



Loading…
取消
儲存