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:
2026-06-18 03:16:01 +02:00
parent d397731db9
commit bcb7ae8ccb
23 changed files with 454 additions and 144 deletions

View File

@@ -11,9 +11,11 @@ Read those, then use the method below.
## What this repo is right now
A complete **design** ([`docs/`](docs/)) plus an **M0 skeleton**: it compiles and links, but
`libvoicecat`'s subsystems are stubs that return `VC_ERR_NOT_IMPLEMENTED`. Your job is to turn
the design into working software, one milestone at a time.
A complete **design** ([`docs/`](docs/)) plus a working implementation through M5: real TLS
control plane, encrypted UDP voice (Opus), multi-stream, TOFU identity pinning, channel tree,
permissions, moderation, disconnect/keepalive/reaper. The Windows WinForms C# client is
shipped (M4). The macOS/iOS Swift client is next. The `skeleton` preset still links a
no-deps stub path (`VC_ERR_NOT_IMPLEMENTED`) for smoke-check builds.
## The working method (important)
@@ -36,24 +38,31 @@ making progress.
## Build
Skeleton (no third-party deps — works immediately):
Default development preset (real deps via vcpkg — works on Windows/Linux/macOS):
```bash
export VCPKG_ROOT=/path/to/vcpkg # bootstrap vcpkg first; cross-platform
cmake --preset dev
cmake --build --preset dev
ctest --preset dev
```
When a subsystem needs real libraries, turn on vcpkg deps:
Skeleton (no third-party deps — works immediately, no vcpkg needed):
```bash
export VCPKG_ROOT=/path/to/vcpkg # bootstrap vcpkg first; cross-platform
cmake --preset server-release # installs deps pinned in vcpkg.json
cmake --build --preset server-release
cmake --preset skeleton
cmake --build --preset skeleton
ctest --preset skeleton
```
`vcpkg.json` currently has a placeholder `builtin-baseline` — set it to a real vcpkg commit
SHA the first time you enable `VOICECAT_USE_VCPKG_DEPS`.
Other presets: `release` (optimized + tests), `server-release` (optimized + stripped,
deployment-shaped), `windows-client` (DLL for C# app), `apple-dev`/`apple-ios`/
`apple-ios-sim` (Apple platform scaffolding). See [`docs/building.md`](docs/building.md)
for the full matrix.
`vcpkg.json` pins all deps to a fixed vcpkg baseline — `cmake --preset dev` resolves them
automatically on first configure. The vcpkg triplet is auto-resolved from the host platform
by [`cmake/voicecat-toolchain.cmake`](cmake/voicecat-toolchain.cmake).
## Where each subsystem lives (and its doc)