FindGit: Fix check for Windows host

When cross-compiling to or from a Windows platform we should still
find a Git for the host environment.
This commit is contained in:
José Simões 2016-12-15 09:31:08 -05:00 committed by Brad King
parent 94c6040b73
commit caeb6d1dfb

View File

@ -30,7 +30,7 @@ set(git_names git eg)
# Prefer .cmd variants on Windows unless running in a Makefile
# in the MSYS shell.
#
if(WIN32)
if(CMAKE_HOST_WIN32)
if(NOT CMAKE_GENERATOR MATCHES "MSYS")
set(git_names git.cmd git eg.cmd eg)
# GitHub search path for Windows