DKSDK_EXECUTABLE_GIT

The full path to the system git executable, if it exists.

The system git is typically the one that has been configured with authentication to private repositories and custom proxies.

A search is required before using this CMake variable. The search is automatic as long as you have done the following at least once:

include(DkSDKDetectExecutables)

On Windows in particular, which can have multiple git executables, the search must be careful to:

  1. Find the system git rather than (for example) a git that has not been configured by the user with credentials.

  2. Not use a Git Bash, Cygwin or MSYS2 git from a directory that also contains binaries like bash that conflict with DkSDK's MSYS2. Often OCaml tools need the system git in the PATH, so any extraneous shells like bash will cause problems.

The search rules are as follows:

  1. On Windows: Look for git-gui.exe in the PATH, which is unique to the \\cmd subdirectory. If it exists we add the git.exe from that directory.

  2. Otherwise look for git (or git.exe on Windows) in the PATH.