File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2121 run : Get-ChildItem "C:\Program Files\Microsoft Visual Studio"
2222 - name : List installed Windows SDKs
2323 run : dir "C:\Program Files (x86)\Windows Kits\10\Lib"
24+
25+ - name : Detect latest Windows SDK version
26+ id : sdk
27+ shell : pwsh
28+ run : |
29+ $sdks = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Lib" |
30+ Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } |
31+ Sort-Object Name -Descending
32+ $latest = $sdks[0].Name
33+ "Latest SDK: $latest"
34+ echo "sdkver=$latest" >> $env:GITHUB_OUTPUT
2435
2536 - uses : ilammy/msvc-dev-cmd@v1
2637 - uses : actions/checkout@v4
3950 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
4051 run : >
4152 cmake --preset x64-release
53+ -DCMAKE_SYSTEM_VERSION=${{ steps.sdk.outputs.sdkver }}
4254 -S ${{ github.workspace }}
4355
4456 - name : Build
You can’t perform that action at this time.
0 commit comments