CMakeLists.txt
changeset 3520 c3dcb80bdb1d
parent 3515 3e8635f43972
child 3522 156c04c6a3d8
child 3529 0e968ba12a84
--- 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