build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5): - Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset) - Drop m2-dev (cache-identical to m1-dev) - Add release preset (optimized + tests on, symbols kept) - Strip server-release binaries (-s linker flag) - Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so the main presets work on Windows/Linux/macOS without per-OS variants. Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md, tech-stack.md, client READMEs) and stale preset-name references in code comments. No C++ behavior changes — the core was already portable.
This commit is contained in:
@@ -17,3 +17,40 @@ Planned shape (see [`docs/architecture.md`](../../docs/architecture.md) §4 and
|
||||
state via an **App Group** ([`docs/voice.md`](../../docs/voice.md) §9).
|
||||
|
||||
Nothing here yet — the core must reach M2 (working voice) before the GUI is worth building.
|
||||
|
||||
## Building the core for Apple platforms (scaffolding)
|
||||
|
||||
The CMake presets `apple-dev`, `apple-ios`, and `apple-ios-sim` produce static `libvoicecat.a`
|
||||
slices for the Swift Package / XCFramework. They are **scaffolding** — not yet CI-validated.
|
||||
Build on macOS (they won't work on Windows/Linux):
|
||||
|
||||
```bash
|
||||
# Prerequisites: VCPKG_ROOT set, Xcode + iOS SDK installed
|
||||
export VCPKG_ROOT=/path/to/vcpkg
|
||||
|
||||
# macOS slice (arm64-osx on Apple Silicon, x64-osx on Intel)
|
||||
cmake --preset apple-dev && cmake --build --preset apple-dev
|
||||
# → build/apple-dev/lib/libvoicecat.a
|
||||
|
||||
# iOS device slice
|
||||
cmake --preset apple-ios && cmake --build --preset apple-ios
|
||||
# → build/apple-ios/lib/libvoicecat.a
|
||||
|
||||
# iOS simulator slice
|
||||
cmake --preset apple-ios-sim && cmake --build --preset apple-ios-sim
|
||||
# → build/apple-ios-sim/lib/libvoicecat.a
|
||||
```
|
||||
|
||||
The three `.a` files are then stitched into an XCFramework:
|
||||
|
||||
```bash
|
||||
xcodebuild -create-xcframework \
|
||||
-library build/apple-dev/lib/libvoicecat.a -headers core/include \
|
||||
-library build/apple-ios/lib/libvoicecat.a -headers core/include \
|
||||
-library build/apple-ios-sim/lib/libvoicecat.a -headers core/include \
|
||||
-output build/VoiceCatCore.xcframework
|
||||
```
|
||||
|
||||
The XCFramework is then consumed by the Swift Package as a binary target. Actual
|
||||
`AVAudioSession` integration, `Info.plist` mic permission, ReplayKit extension, and SwiftUI
|
||||
UI work are tracked as follow-up tasks — the presets exist so the build entry point is ready.
|
||||
|
||||
@@ -16,8 +16,8 @@ WinForms (.NET 10 LTS) UI over `voicecat.dll` (MinGW-built `libvoicecat` shared
|
||||
### 1. Build the server (for testing)
|
||||
|
||||
```powershell
|
||||
cmake --preset m1-dev
|
||||
cmake --build --preset m1-dev --target voicecat-server
|
||||
cmake --preset dev
|
||||
cmake --build --preset dev --target voicecat-server
|
||||
```
|
||||
|
||||
### 2. Build the DLL
|
||||
@@ -53,7 +53,7 @@ into the output directory automatically on every build.
|
||||
|
||||
```powershell
|
||||
# Terminal 1 — start the server
|
||||
./build/m1-dev/bin/voicecat-server.exe --name "My Server"
|
||||
./build/dev/bin/voicecat-server.exe --name "My Server"
|
||||
|
||||
# Terminal 2 — launch the client
|
||||
dotnet run --project clients/windows/VoiceCat.App/VoiceCat.App.csproj
|
||||
|
||||
Reference in New Issue
Block a user