Fix CMake and AboutThisBuild with git (see issue #2860)

Tools to generate the release info are not updated jet, namely
tools/generateReleaseInfo{.bat}.
Only tested on Linux, OS X and Windows are untested.
This commit is contained in:
Philip Rinn
2015-08-14 19:06:01 +02:00
parent 294c3cccdc
commit 3b9b484ec1
5 changed files with 27 additions and 35 deletions

View File

@@ -19,16 +19,6 @@ else (WIN32)
endif (WIN32)
if (WIN32)
find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../)
# Fail if Mercurial is not installed
if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
message(FATAL_ERROR "hg command not found!")
else (HG_CMD STREQUAL HG_CMD-NOTFOUND)
message(STATUS "hg command found: ${HG_CMD}")
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (HG_CMD STREQUAL HG_CMD-NOTFOUND)
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
set(BUILD_BIT_DEPTH 32)
# 32 bits builds has to be installable on 64 bits system, to support WinXP/64.