Support Windows.Clang.toolchain.cmake and Windows.Kits.cmake consumption from Linux#153
Merged
MarkSchofield merged 1 commit intomainfrom Feb 3, 2026
Merged
Conversation
MarkSchofield
commented
Feb 2, 2026
feff7a6 to
d26d613
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#148 floated the idea of support for cross-compiling for Windows from Linux using the Windows.Clang.toolchain.cmake. After a few fixes - #149, #151, #152 - this PR sketches the approach.
VS_INSTALLATION_PATHvariable needs to be set. This PR adds support when building on WSL to obtain theVS_INSTALLATION_PATHvalue usingvswhere.exeon Windows.CMAKE_WINDOWS_KITS_10_DIRvariable needs to be set. This PR adds support when building on WSL to calculateCMAKE_WINDOWS_KITS_10_DIRby reading from the Windows OS registry.CMAKE_SYSTEM_PROCESSORneed to be accommodated when calculatingCMAKE_VS_PLATFORM_TOOLSET_ARCHITECTUREandWINDOWS_KITS_TARGET_ARCHITECTURE.This PR adds CMake presets showing cross-compilation from Linux for arm64 and x64, using clang-20 on WSL - leveraging the toolchain support for discovering a VS installation, and a Windows SDK.