Skip to content

Commit 635b6d9

Browse files
manbeariandennisameling
authored andcommitted
vcbuild: install ARM64 dependencies when building ARM64 binaries
Co-authored-by: Dennis Ameling <[email protected]> Signed-off-by: Ian Bearman <[email protected]> Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9468f11 commit 635b6d9

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

compat/vcbuild/README

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ The Steps to Build Git with VS2015 or VS2017 from the command line.
66
Prompt or from an SDK bash window:
77

88
$ cd <repo_root>
9-
$ ./compat/vcbuild/vcpkg_install.bat
9+
$ ./compat/vcbuild/vcpkg_install.bat x64-windows
10+
11+
or
12+
13+
$ ./compat/vcbuild/vcpkg_install.bat arm64-windows
1014

1115
The vcpkg tools and all of the third-party sources will be installed
1216
in this folder:

compat/vcbuild/vcpkg_copy_dlls.bat

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ REM ================================================================
1515
@FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
1616
cd %cwd%
1717

18-
SET arch=x64-windows
18+
SET arch=%2
19+
IF NOT DEFINED arch (
20+
echo defaulting to 'x64-windows`. Invoke %0 with 'x86-windows', 'x64-windows', or 'arm64-windows'
21+
set arch=x64-windows
22+
)
23+
1924
SET inst=%cwd%vcpkg\installed\%arch%
2025

2126
IF [%1]==[release] (

compat/vcbuild/vcpkg_install.bat

+7-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ REM ================================================================
3131

3232
SETLOCAL EnableDelayedExpansion
3333

34+
SET arch=%1
35+
IF NOT DEFINED arch (
36+
echo defaulting to 'x64-windows`. Invoke %0 with 'x86-windows', 'x64-windows', or 'arm64-windows'
37+
set arch=x64-windows
38+
)
39+
3440
@FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
3541
cd %cwd%
3642

@@ -55,9 +61,8 @@ REM ================================================================
5561
echo Successfully installed %cwd%vcpkg\vcpkg.exe
5662

5763
:install_libraries
58-
SET arch=x64-windows
5964

60-
echo Installing third-party libraries...
65+
echo Installing third-party libraries(%arch%)...
6166
FOR %%i IN (zlib expat libiconv openssl libssh2 curl) DO (
6267
cd %cwd%vcpkg
6368
IF NOT EXIST "packages\%%i_%arch%" CALL :sub__install_one %%i

contrib/buildsystems/Generators/Vcxproj.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ EOM
193193
<PreBuildEvent Condition="!Exists('$cdup\\compat\\vcbuild\\vcpkg\\installed\\\$(VCPKGArch)\\include\\openssl\\ssl.h')">
194194
<Message>Initialize VCPKG</Message>
195195
<Command>del "$cdup\\compat\\vcbuild\\vcpkg"</Command>
196-
<Command>call "$cdup\\compat\\vcbuild\\vcpkg_install.bat"</Command>
196+
<Command>call "$cdup\\compat\\vcbuild\\vcpkg_install.bat" \$(VCPKGArch)</Command>
197197
</PreBuildEvent>
198198
EOM
199199
}

0 commit comments

Comments
 (0)