CMake: Fix building w/o FindGit
This commit is contained in:
parent
6f5d1e257e
commit
c8ebc8736e
|
@ -10,7 +10,7 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
|
|||
# Guess if this is a git working copy and then look up the revision
|
||||
if(EXISTS ${SOURCE_DIR}/.git)
|
||||
# The FindGit.cmake module is part of the standard distribution
|
||||
include(FindGit)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
|
|||
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
|
||||
set(MY_WC_HASH "unknown")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
include(FindGit)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
|
|
Loading…
Reference in New Issue