From: Carlo Marcelo Arenas Belón Date: Wed, 27 Jul 2022 09:05:56 +0000 (+0000) Subject: cmake: support local installations of git X-Git-Tag: v2.37.3~14^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=476e54b1c604c7e0bb5265e8995e53aad1a13877;p=thirdparty%2Fgit.git cmake: support local installations of git At least in systems where the user is local and not an administrator git will install in a subdirectory of %APPDATALOCAL%, so it makes sense to also look there for the shell needed by the cmake integration with Visual Studio. Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 1b23f2440d..2237109b57 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -77,7 +77,7 @@ if(USE_VCPKG) set(CMAKE_TOOLCHAIN_FILE ${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file") endif() -find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin") +find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin" "$ENV{LOCALAPPDATA}/Programs/Git/bin") if(NOT SH_EXE) message(FATAL_ERROR "sh: shell interpreter was not found in your path, please install one." "On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/")