]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cmake: support local installations of git
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Wed, 27 Jul 2022 09:05:56 +0000 (09:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Jul 2022 15:57:33 +0000 (08:57 -0700)
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 <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/buildsystems/CMakeLists.txt

index 1b23f2440d8e4514fea064a7c4d7937b8598f6fc..2237109b57fd12ad58b1ff1ed8bcbb4a3bffc5a5 100644 (file)
@@ -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/")