瀏覽代碼

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.
José Simões 9 年之前
父節點
當前提交
caeb6d1dfb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/FindGit.cmake

+ 1 - 1
Modules/FindGit.cmake

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