Enable the SHA sum in linux when build from source tar.

This commit is contained in:
Klaas Freitag 2015-02-06 12:18:09 +01:00
parent 1e57432aae
commit dbca7469f2

View file

@ -57,12 +57,12 @@ include(QtVersionAbstraction)
setup_qt() setup_qt()
include(GetGitRevisionDescription) include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1) get_git_head_revision(GIT_REFSPEC GIT_SHA1)
# if we cannot get it from git, directly try .tag (packages) # if we cannot get it from git, directly try .tag (packages)
# this will work if the tar balls have been properly created # this will work if the tar balls have been properly created
# via git-archive. # via git-archive.
if (GIT_SHA1)
if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND") if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
file(READ ${CMAKE_SOURCE_DIR}/.tag sha1_candidate) file(READ ${CMAKE_SOURCE_DIR}/.tag sha1_candidate)
string(REPLACE "\n" "" sha1_candidate ${sha1_candidate}) string(REPLACE "\n" "" sha1_candidate ${sha1_candidate})
@ -72,7 +72,6 @@ if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
endif() endif()
endif() endif()
message(STATUS "GIT_SHA1 ${GIT_SHA1}") message(STATUS "GIT_SHA1 ${GIT_SHA1}")
endif()
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(DATADIR ${DATA_INSTALL_DIR}) set(DATADIR ${DATA_INSTALL_DIR})