Fix GIT_EXECUTABLE usage.

This commit is contained in:
levlam 2022-07-21 20:24:03 +03:00
parent 3ffe770d57
commit ffc26eea08

View File

@ -69,10 +69,12 @@ function(get_git_head_revision _refspecvar _hashvar)
return() return()
endif() endif()
find_package(Git)
# Check if the current source dir is a git submodule or a worktree. # Check if the current source dir is a git submodule or a worktree.
# In both cases .git is a file instead of a directory. # In both cases .git is a file instead of a directory.
# #
if (NOT IS_DIRECTORY ${GIT_DIR}) if ((NOT IS_DIRECTORY ${GIT_DIR}) AND Git_FOUND)
# The following git command will return a non empty string that # The following git command will return a non empty string that
# points to the super project working tree if the current # points to the super project working tree if the current
# source dir is inside a git submodule. # source dir is inside a git submodule.