build: bundle vcpkg as a git submodule, pinned to the manifest baseline
Adds vcpkg as a submodule at vcpkg/, pinned to the exact commit vcpkg.json already declares as builtin-baseline, so the bundled checkout and the manifest's resolved port versions can never drift apart. cmake/voicecat-toolchain.cmake, scripts/common.sh, and clients/apple/scripts/build-xcframework.sh now resolve vcpkg as: VCPKG_ROOT env var (external checkout) > bundled submodule. Docs updated to describe the new one-time setup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,21 +75,32 @@ was run.
|
||||
|
||||
## 2. One-time setup for the real-deps presets
|
||||
|
||||
All presets except `vcpkg-common` need `VCPKG_ROOT`
|
||||
pointing at a bootstrapped vcpkg checkout:
|
||||
vcpkg is bundled as a git submodule at [`vcpkg/`](../vcpkg), pinned to the exact commit in
|
||||
[`vcpkg.json`](../vcpkg.json)'s `builtin-baseline` — so the bundled checkout and the manifest's
|
||||
resolved port versions can never drift apart. All presets except `vcpkg-common` need it
|
||||
bootstrapped:
|
||||
|
||||
```bash
|
||||
# once:
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
# once, after cloning:
|
||||
git submodule update --init vcpkg
|
||||
./vcpkg/bootstrap-vcpkg.sh # .bat on Windows
|
||||
```
|
||||
|
||||
# every shell session (PowerShell):
|
||||
`cmake/voicecat-toolchain.cmake` resolves the vcpkg root itself — no environment variable
|
||||
needed. If you'd rather use an external vcpkg checkout (e.g. one shared across several
|
||||
projects), set `VCPKG_ROOT` and it takes priority over the bundled submodule:
|
||||
|
||||
```bash
|
||||
# PowerShell:
|
||||
$env:VCPKG_ROOT = "D:\path\to\vcpkg"
|
||||
|
||||
# or on Linux/macOS:
|
||||
# Linux/macOS:
|
||||
export VCPKG_ROOT=/path/to/vcpkg
|
||||
```
|
||||
|
||||
An external checkout must still be bootstrapped, and should be at (or compatible with)
|
||||
`vcpkg.json`'s `builtin-baseline` commit to resolve the same port versions.
|
||||
|
||||
`vcpkg.json` (manifest mode) pins every dependency (protobuf, mbedTLS, libsodium, asio,
|
||||
sqlite3, spdlog, opus, miniaudio) — `cmake --preset dev` resolves and builds them
|
||||
automatically on first configure. That first configure is slow (vcpkg building from source);
|
||||
|
||||
Reference in New Issue
Block a user