Rearrange the way mercurial-less build works (see issue 1342):

The cmake option AUTOMATED_BUILD_SYSTEM is removed and replaced by an automated
detection. Now it is possible to ship source tarballs that build without
mercurial on all platforms. The needed information is generated by the script
tools/generateReleaseInfo.{sh,bat} before the tarball is build.
This commit is contained in:
Philip Rinn
2012-06-18 17:35:53 +02:00
parent cbe233c8cf
commit 63cae64611
4 changed files with 99 additions and 123 deletions

14
tools/generateReleaseInfo Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
hgBranch="`hg branch`"
hgLatesttag="`hg parents --template '{latesttag}'`"
hgLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
hgChangeset="`hg parents --template '{node|short}'`"
echo "set(HG_BRANCH $hgBranch)
set(HG_VERSION $hgLatesttag.$hgLatesttagdistance)
set(HG_CHANGESET $hgChangeset)
set(HG_TAGDISTANCE $hgLatesttagdistance)
if (CACHE_NAME_SUFFIX STREQUAL \"\")
set(CACHE_NAME_SUFFIX $hgLatesttag)
endif()" > ReleaseInfo.cmake