Skip to content

chore(build): align vcpkg configuration with registry baseline#246

Merged
kcenon merged 2 commits into
mainfrom
chore/vcpkg-ecosystem-alignment
Mar 28, 2026
Merged

chore(build): align vcpkg configuration with registry baseline#246
kcenon merged 2 commits into
mainfrom
chore/vcpkg-ecosystem-alignment

Conversation

@kcenon
Copy link
Copy Markdown
Owner

@kcenon kcenon commented Mar 28, 2026

What

Summary

Aligns vcpkg ecosystem configuration with the latest registry baseline and improves CMake package resolution for vcpkg manifest mode. Adds a dedicated vcpkg CMake preset for streamlined builds.

Change Type

  • Chore (build configuration)
  • Documentation

Affected Components

  • vcpkg-configuration.json — registry baseline update
  • cmake/UnifiedDependencies.cmake — CONFIG hint for find_package
  • CMakePresets.json — new vcpkg preset
  • README.md, docs/guides/BUILD_TROUBLESHOOTING.md, docs/guides/DEVELOPER_GUIDE.md — documentation

Why

Problem Solved

The vcpkg registry baseline (77cc46d5) was outdated, which could cause dependency resolution failures or version mismatches when building with vcpkg manifest mode. Additionally, find_package() calls lacked CONFIG hints, causing CMake to prefer module-mode search over vcpkg-installed config packages.

Related Issues

Alternative Approaches Considered

  1. Updating only the baseline without adding CONFIG hints — rejected because find_package module mode can silently pick up system packages instead of vcpkg-installed ones.
  2. Using FetchContent exclusively — rejected because vcpkg manifest mode is the recommended ecosystem approach.

Where

Files Changed

File Type of Change
vcpkg-configuration.json Baseline update (77cc46d5afdfab7f)
cmake/UnifiedDependencies.cmake Added CONFIG hint to find_package calls
CMakePresets.json New vcpkg configure and build presets
README.md Updated build instructions with vcpkg preset
docs/guides/BUILD_TROUBLESHOOTING.md Added vcpkg baseline troubleshooting section
docs/guides/DEVELOPER_GUIDE.md Added vcpkg preset usage instructions

How

Implementation Details

  1. Baseline update: Updated vcpkg-configuration.json to point to latest registry commit (afdfab7f) for current package versions.
  2. CONFIG mode: Added CONFIG keyword to find_package() in UnifiedDependencies.cmake so CMake prefers vcpkg config-mode packages over system module-mode discovery.
  3. CMake preset: Added a vcpkg preset in CMakePresets.json that sets the vcpkg toolchain file, enables external systems, and disables FetchContent — providing a one-command build experience.

Testing Done

  • Verified vcpkg-configuration.json is valid JSON
  • Verified CMakePresets.json schema compliance
  • Reviewed find_package CONFIG behavior with vcpkg documentation

Test Plan

  1. Clone the branch
  2. Set VCPKG_ROOT environment variable
  3. Run cmake --preset vcpkg && cmake --build --preset vcpkg
  4. Verify all dependencies resolve from vcpkg registry

Breaking Changes

None — existing build workflows are unaffected. The new vcpkg preset is opt-in.

Developer added 2 commits March 28, 2026 15:29
Update kcenon vcpkg-registry baseline to latest commit (afdfab7)
which includes 18 commits of portfile fixes for cmake config paths,
dependency declarations, and FETCHCONTENT flags.

Add CONFIG hint to find_package calls in UnifiedDependencies.cmake
to ensure vcpkg-installed config-mode packages are found reliably.

Add vcpkg manifest mode preset to CMakePresets.json referencing
$env{VCPKG_ROOT} toolchain file for standardized local builds.

Refs: #245
…ment

- README.md: add vcpkg preset as build option alongside manual toolchain
- BUILD_TROUBLESHOOTING.md: add section on stale vcpkg baseline issues
- DEVELOPER_GUIDE.md: add vcpkg preset option to build instructions
@kcenon kcenon merged commit b5d2913 into main Mar 28, 2026
12 checks passed
@kcenon kcenon deleted the chore/vcpkg-ecosystem-alignment branch March 28, 2026 06:54
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.

chore(build): verify vcpkg ecosystem alignment with registry baseline

1 participant