FindGit: Search in 'GitHub for Windows' user directory

This commit is contained in:
Frank Park 2015-01-12 21:23:37 -05:00 committed by Brad King
parent 3dec4a2bfb
commit 546906243d
1 changed files with 4 additions and 0 deletions

View File

@ -45,11 +45,15 @@ set(git_names git eg)
if(WIN32)
if(NOT CMAKE_GENERATOR MATCHES "MSYS")
set(git_names git.cmd git eg.cmd eg)
# GitHub search path for Windows
set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin")
file(GLOB github_path "${github_path}")
endif()
endif()
find_program(GIT_EXECUTABLE
NAMES ${git_names}
PATHS ${github_path}
PATH_SUFFIXES Git/cmd Git/bin
DOC "git command line client"
)