From 76b41795a6fc5e1cee304bf1e7563e10ab987a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Thu, 21 Apr 2022 12:58:12 -0700 Subject: [PATCH] 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. --- contrib/buildsystems/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index ac20894c59d52d..2cab53b6307f7a 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -95,7 +95,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/")