Merge topic 'FindGit-Atlassian-SourceTree'

57f701a7 FindGit: Search in 'Atlassian SourceTree' user directory (#15758)
This commit is contained in:
Brad King 2015-10-13 13:51:00 -04:00 committed by CMake Topic Stage
commit d6af5566e8
1 changed files with 5 additions and 1 deletions

View File

@ -48,17 +48,21 @@ if(WIN32)
# GitHub search path for Windows # GitHub search path for Windows
set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin") set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin")
file(GLOB github_path "${github_path}") file(GLOB github_path "${github_path}")
# SourceTree search path for Windows
set(_git_sourcetree_path "$ENV{LOCALAPPDATA}/Atlassian/SourceTree/git_local/bin")
endif() endif()
endif() endif()
find_program(GIT_EXECUTABLE find_program(GIT_EXECUTABLE
NAMES ${git_names} NAMES ${git_names}
PATHS ${github_path} PATHS ${github_path} ${_git_sourcetree_path}
PATH_SUFFIXES Git/cmd Git/bin PATH_SUFFIXES Git/cmd Git/bin
DOC "git command line client" DOC "git command line client"
) )
mark_as_advanced(GIT_EXECUTABLE) mark_as_advanced(GIT_EXECUTABLE)
unset(_git_sourcetree_path)
if(GIT_EXECUTABLE) if(GIT_EXECUTABLE)
execute_process(COMMAND ${GIT_EXECUTABLE} --version execute_process(COMMAND ${GIT_EXECUTABLE} --version
OUTPUT_VARIABLE git_version OUTPUT_VARIABLE git_version