add local rev number/rev count to dev version suffix
authorsheepluva
Fri, 18 Jun 2010 20:45:45 +0200
changeset 3520 c3dcb80bdb1d
parent 3519 56cbc035b74b
child 3521 96a502730e81
child 3522 156c04c6a3d8
add local rev number/rev count to dev version suffix
CMakeLists.txt
--- a/CMakeLists.txt	Fri Jun 18 14:26:04 2010 -0400
+++ b/CMakeLists.txt	Fri Jun 18 20:45:45 2010 +0200
@@ -15,10 +15,10 @@
 		FIND_PROGRAM(HGCOMMAND hg)
 		IF(HGCOMMAND)
 			exec_program(${HGCOMMAND} 
-				     ARGS identify ${CMAKE_CURRENT_SOURCE_DIR}
+				     ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR}
 				     OUTPUT_VARIABLE version_suffix
 				     )
-			STRING(REGEX REPLACE "(.*) +.*" "\\1" version_suffix ${version_suffix})
+			STRING(REGEX REPLACE "(.*) +(.*)" "\\2:\\1" version_suffix ${version_suffix})
 			MESSAGE(STATUS "Builing revision ${version_suffix}")
 			set(version_suffix ".${version_suffix}")
 #			#truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019