build/msvc: Add Git as a requirement for Windows patches

This commit is contained in:
b-r-o-c-k
2018-03-06 20:38:10 -06:00
parent c29a82c45f
commit 8ba8d7244f
3 changed files with 11 additions and 4 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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}