Add vcpkg link also for windows

This commit is contained in:
Tal Regev 2023-03-17 17:42:46 +02:00
parent 43a883060d
commit 47873ff36e
No known key found for this signature in database
GPG Key ID: A421558E0F87AC82
4 changed files with 10 additions and 3 deletions

2
3rdParty/vcpkg_ports/vcpkg_link.bat vendored Normal file
View File

@ -0,0 +1,2 @@
set VCPKG_LINK=https://github.com/microsoft/vcpkg
echo %VCPKG_LINK%

3
3rdParty/vcpkg_ports/vcpkg_link.sh vendored Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/bin/sh
export VCPKG_LINK=https://github.com/microsoft/vcpkg
export VCPKG_LINK="https://github.com/microsoft/vcpkg"
echo $VCPKG_LINK

View File

@ -171,7 +171,10 @@
<Touch Files="$(CudaGuardFile)" AlwaysCreate="true" />
</Target>
<Target Name="InstallVcpkg" BeforeTargets="Build3rdPartyLibraries" DependsOnTargets="CreateFolders" AfterTargets="DownloadCUDA">
<Exec Command="git clone https://github.com/microsoft/vcpkg" WorkingDirectory="$(Windows3rdPartyBuildDir)" ConsoleToMSBuild="true" Condition="!Exists($(VcpkgRootDir))" />
<Exec Command="$(Windows3rdPartyBuildDir)\..\vcpkg_ports\vcpkg_link.bat" WorkingDirectory="$(Windows3rdPartyBuildDir)" ConsoleToMSBuild="true" >
<Output TaskParameter="ConsoleOutput" PropertyName="VCPKG_LINK" />
</Exec>
<Exec Command="git clone $(VCPKG_LINK)" WorkingDirectory="$(Windows3rdPartyBuildDir)" ConsoleToMSBuild="true" Condition="!Exists($(VcpkgRootDir))" />
<Exec Command="git pull" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
<Exec Command="bootstrap-vcpkg.bat" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
</Target>

View File

@ -9,10 +9,11 @@ set "BUILD_DIR=%CD%\3rdParty\Windows"
set "VCPKG_PORTS=%CD%\3rdParty\vcpkg_ports"
set "VCPKG_ROOT=%BUILD_DIR%\vcpkg"
call "%CD%\3rdParty\vcpkg_ports\vcpkg_link.bat"
if not exist "%VCPKG_ROOT%" (
mkdir -p "%VCPKG_ROOT%"
git -C %BUILD_DIR% clone https://github.com/microsoft/vcpkg
git -C %BUILD_DIR% clone %VCPKG_LINK%
)