feat: docs for cross build on macOS

This commit is contained in:
TaurusXin 2024-09-20 23:55:46 +08:00
parent 5e41d41874
commit bc5719ac11
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ cmake -G "Visual Studio 17 2022" -A x64 -B build
# Linux / macOS
cmake -DCMAKE_BUILD_TYPE=Release -B build
# 如果需要在 macOS 下交叉编译,可以指定 `CMAKE_OSX_ARCHITECTURES` 变量来指明目标系统架构
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -B build # arm64
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 -B build # Intel-based
```
编译项目