Buildsystem: Generate revision.h additionally during initial cmake run, also fixes displaying revision during run

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-10-03 16:55:24 +02:00
parent 6c35c376e9
commit 729e618baa
2 changed files with 8 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ if( UNIX )
find_package(BZip2)
endif()
# Find revision ID and hash of the sourcetree
include(cmake/genrev.cmake)
# print out the results before continuing
include(cmake/showoptions.cmake)

View File

@@ -56,6 +56,11 @@ if(NOT hg_rev_id_str MATCHES "Archive")
endif()
string(REPLACE "+" "" hg_rev_hash ${hg_rev_hash_str})
# Its not set during initial run
if(NOT BUILDDIR)
set(BUILDDIR ${CMAKE_BINARY_DIR})
endif()
# Create the actual revision.h file from the above params
configure_file(
"${CMAKE_SOURCE_DIR}/revision.h.in.cmake"