aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--third-party/CMakeLists.txt7
-rw-r--r--third-party/cmake/BuildLibvterm.cmake4
-rw-r--r--third-party/cmake/BuildLuarocks.cmake4
3 files changed, 11 insertions, 4 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index c523ecea00..7c95bbb91d 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -50,6 +50,13 @@ endif()
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
+if(WIN32)
+ find_package(Git)
+ if(NOT Git_FOUND)
+ message(FATAL_ERROR "Git is required to apply patches for Windows.")
+ endif()
+endif()
+
if(UNIX)
find_program(MAKE_PRG NAMES gmake make)
if(MAKE_PRG)
diff --git a/third-party/cmake/BuildLibvterm.cmake b/third-party/cmake/BuildLibvterm.cmake
index 5fb077e972..73e2990654 100644
--- a/third-party/cmake/BuildLibvterm.cmake
+++ b/third-party/cmake/BuildLibvterm.cmake
@@ -37,8 +37,8 @@ endfunction()
if(WIN32)
if(MSVC)
set(LIBVTERM_PATCH_COMMAND
- git -C ${DEPS_BUILD_DIR}/src/libvterm init
- COMMAND git -C ${DEPS_BUILD_DIR}/src/libvterm apply
+ ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libvterm init
+ COMMAND ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/libvterm apply
${CMAKE_CURRENT_SOURCE_DIR}/patches/libvterm-Remove-VLAs-for-MSVC.patch)
endif()
set(LIBVTERM_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index 297fedb888..47c6412d86 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -84,8 +84,8 @@ elseif(MSVC OR MINGW)
# Ignore USE_BUNDLED_LUAJIT - always ON for native Win32
BuildLuarocks(
PATCH_COMMAND
- git -C ${DEPS_BUILD_DIR}/src/luarocks init
- COMMAND git -C ${DEPS_BUILD_DIR}/src/luarocks apply
+ ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/luarocks init
+ COMMAND ${GIT_EXECUTABLE} -C ${DEPS_BUILD_DIR}/src/luarocks apply
${CMAKE_CURRENT_SOURCE_DIR}/patches/luarocks-Change-default-downloader-to-curl.patch
INSTALL_COMMAND install.bat /FORCECONFIG /NOREG /NOADMIN /Q /F
/LUA ${DEPS_INSTALL_DIR}