Skip to content

cmake: fix windows-everything configure failures - #126

Open
Yaraslaut wants to merge 1 commit into
masterfrom
fix-windows-everything-libsodium
Open

cmake: fix windows-everything configure failures#126
Yaraslaut wants to merge 1 commit into
masterfrom
fix-windows-everything-libsodium

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Summary

Fixes three real configure-time failures in the windows-everything preset added by #124, found by actually running cmake --preset windows-everything on Windows — no CI leg had exercised this option combination before.

  1. MORPH_BUILD_HMAC_EXAMPLE_LIBSODIUM (defaults ON under MORPH_BUILD_HMAC_EXAMPLES) requires PkgConfig + a libsodium pkg-config file. Neither is available via this toolchain (no CI leg builds HMAC examples on Windows, and vcpkg.json didn't list libsodium). Turned off explicitly in the preset; the OpenSSL adapter (MORPH_BUILD_HMAC_EXAMPLE_OPENSSL) stays on.
  2. MORPH_BUILD_HMAC_EXAMPLE_OPENSSL and MORPH_BUILD_OFFLINE_SQLITE need OpenSSL and SQLite3 respectively — neither was listed in vcpkg.json. Added both.
  3. examples/bank/CMakeLists.txt's own FetchContent fetch of Lightweight was missing the CMAKE_SKIP_INSTALL_RULES guard that examples/common/CMakeLists.txt already carries for the identical problem: Lightweight's install() rules reference $<TARGET_PDB_FILE:Lightweight>, which CMake rejects at generate time for a static build (LIGHTWEIGHT_BUILD_SHARED=OFF). This was never hit before because no existing preset turned on both MORPH_BUILD_BANK_EXAMPLE and MORPH_BUILD_LADDER together on Windows.

Verification

cmake --preset windows-everything now configures cleanly end to end (confirmed locally — "Configuring done" / "Generating done" / "Build files have been written").

🤖 Generated with Claude Code

Three gaps surfaced when actually configuring windows-everything on a
real Windows machine (no CI leg has ever exercised this option
combination):

- MORPH_BUILD_HMAC_EXAMPLE_LIBSODIUM (defaults ON under
  MORPH_BUILD_HMAC_EXAMPLES) needs PkgConfig + a libsodium pkg-config
  file, neither available via this toolchain. Turn it off explicitly;
  the OpenSSL adapter stays on.
- MORPH_BUILD_HMAC_EXAMPLE_OPENSSL and MORPH_BUILD_OFFLINE_SQLITE
  need OpenSSL and SQLite3 respectively, neither listed in
  vcpkg.json. Add both as vcpkg dependencies.
- examples/bank/CMakeLists.txt's own Lightweight FetchContent fetch
  was missing the CMAKE_SKIP_INSTALL_RULES guard that
  examples/common/CMakeLists.txt already carries for the same
  problem: Lightweight's install() rules reference
  $<TARGET_PDB_FILE:Lightweight>, which CMake rejects for a static
  build (LIGHTWEIGHT_BUILD_SHARED=OFF) at generate time. This was
  never hit before because no existing preset turned on
  MORPH_BUILD_BANK_EXAMPLE and MORPH_BUILD_LADDER together on
  Windows.

Verified: windows-everything now configures cleanly end to end
(cmake --preset windows-everything).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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