Skip to content

Commit 2dfcd30

Browse files
dennisamelingdscho
authored andcommitted
cmake: allow building for Windows/ARM64
Signed-off-by: Dennis Ameling <dennis@dennisameling.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3a442eb commit 2dfcd30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/buildsystems/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ if(USE_VCPKG)
6565
set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg")
6666
if(NOT EXISTS ${VCPKG_DIR})
6767
message("Initializing vcpkg and building the Git's dependencies (this will take a while...)")
68-
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat)
68+
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH})
6969
endif()
70-
list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/x64-windows")
70+
list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/${VCPKG_ARCH}")
7171

7272
# In the vcpkg edition, we need this to be able to link to libcurl
7373
set(CURL_NO_CURL_CMAKE ON)
@@ -1207,7 +1207,7 @@ string(REPLACE "@USE_GETTEXT_SCHEME@" "" git_build_options "${git_build_options}
12071207
string(REPLACE "@USE_LIBPCRE2@" "" git_build_options "${git_build_options}")
12081208
string(REPLACE "@X@" "${EXE_EXTENSION}" git_build_options "${git_build_options}")
12091209
if(USE_VCPKG)
1210-
string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n")
1210+
string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/${VCPKG_ARCH}/bin\"\n")
12111211
endif()
12121212
file(WRITE ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS ${git_build_options})
12131213

0 commit comments

Comments
 (0)