]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cmake: do find Git for Windows' shell interpreter
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 28 Sep 2020 21:09:07 +0000 (21:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Sep 2020 22:11:39 +0000 (15:11 -0700)
By default, Git for Windows does not install its `sh.exe` into the
`PATH`. However, our current `CMakeLists.txt` expects to find a shell
interpreter in the `PATH`.

So let's fall back to looking in the default location where Git for
Windows _does_ install a relatively convenient `sh.exe`:
`C:\Program Files\Git\bin\sh.exe`

Helped-by: Øystein Walle <oystwa@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 5007f173f1ed324ba5c557dafbfeead7c9befc08..1847a6fd581544cd744403d6ba679d55f57640d4 100644 (file)
@@ -41,7 +41,7 @@ cmake_minimum_required(VERSION 3.14)
 #set the source directory to root of git
 set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
 
-find_program(SH_EXE sh)
+find_program(SH_EXE sh PATHS "C:/Program Files/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/")