Windows: clean up vcpkg buildtrees and packages in provisioning

After vcpkg has installed libraries, only the contents of
$vcpkgRoot\installed are needed by Qt builds. The vcpkg \buildtrees and
\packages directories should be deleted to significantly reduce Windows
tier-2 image size.

Pick-to: 6.11 6.8
Task-number: QTBUG-115715
Change-Id: I311242c61ba7000cdcc49b0f6ff92cf343e209c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Elias Toivola
2026-05-08 20:40:44 +03:00
parent 57901788c3
commit 0dab9c3637

View File

@@ -21,5 +21,7 @@ Run-Executable "cmake" "-DVCPKG_EXECUTABLE=$vcpkgExe -DVCPKG_INSTALL_ROOT=$vcpkg
Set-EnvironmentVariable "VCPKG_INSTALLED_DIR" "$vcpkgRoot\installed"
Remove-Item -Path "$vcpkginstallroot" -Recurse -Force
Remove-Item -Path "$vcpkgRoot\buildtrees" -Recurse -Force
Remove-Item -Path "$vcpkgRoot\packages" -Recurse -Force
Set-Location "$PSScriptRoot"