ci: Add workaround for vcpkg's libevent package

This change is necessary for Windows GHA images, which provide
CMake >= 4.0.

Github-Pull: #32184
Rebased-From: ef00a28414
This commit is contained in:
Hennadii Stepanov 2025-04-01 15:02:47 +01:00 committed by fanquake
parent 85f3e1de68
commit 64552c83b2
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 5 additions and 3 deletions

View File

@ -194,10 +194,12 @@ jobs:
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())" Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
- name: Using vcpkg with MSBuild - name: Using vcpkg with MSBuild
shell: bash
run: | run: |
Set-Location "$env:VCPKG_INSTALLATION_ROOT" echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)" echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)" # Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
- name: vcpkg tools cache - name: vcpkg tools cache
uses: actions/cache@v4 uses: actions/cache@v4