Merge pull request #3317 from fwalch/cmake/git-lookup

CMake: Use project directory to look for Git revision.
This commit is contained in:
Justin M. Keyes 2015-09-09 00:40:34 -04:00
commit 87ffa7794b

View File

@ -48,6 +48,7 @@ endif()
# Version tokens # Version tokens
include(GetGitRevisionDescription) include(GetGitRevisionDescription)
file(TO_NATIVE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git GIT_DIR)
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT) get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
if(NOT NVIM_VERSION_COMMIT) if(NOT NVIM_VERSION_COMMIT)
set(NVIM_VERSION_COMMIT "?") set(NVIM_VERSION_COMMIT "?")