Skip to content

fix(macos-build): detect vcpkg root automatically#122

Merged
fbraz3 merged 1 commit into
mainfrom
fix/macos-vcpkg-root-detection
May 4, 2026
Merged

fix(macos-build): detect vcpkg root automatically#122
fbraz3 merged 1 commit into
mainfrom
fix/macos-vcpkg-root-detection

Conversation

@fbraz3

@fbraz3 fbraz3 commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • add automatic VCPKG_ROOT resolution to macOS build entry scripts
  • validate existing env value before configure
  • detect common install paths (workspace, home, /opt, Homebrew)
  • emit actionable error if vcpkg toolchain cannot be found

Why

A user report in Discussion #120 showed configure failing with:
Could not find toolchain file: /scripts/buildsystems/vcpkg.cmake

This happens when VCPKG_ROOT is unset/invalid and the preset inherits default-vcpkg.

Validation

  • bash -n scripts/build/macos/build-macos-zh.sh
  • bash -n scripts/build/macos/build-macos-generals.sh
  • runtime check with invalid env:
    • VCPKG_ROOT=/invalid/path ./scripts/build/macos/build-macos-zh.sh --build-only
    • script warns and auto-detects local vcpkg root

Related-to #120

Handle missing or invalid VCPKG_ROOT in macOS build entry scripts by

auto-detecting common vcpkg install paths (including Homebrew).

This prevents configure failures that resolve to

'/scripts/buildsystems/vcpkg.cmake' when the environment variable

is unset, and provides actionable guidance when detection fails.

Related-to #120
@fbraz3 fbraz3 merged commit b9a18f6 into main May 4, 2026
6 checks passed
@fbraz3 fbraz3 deleted the fix/macos-vcpkg-root-detection branch May 4, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant