CMakeLists.txt
changeset 3520 c3dcb80bdb1d
parent 3515 3e8635f43972
child 3522 156c04c6a3d8
child 3529 0e968ba12a84
equal deleted inserted replaced
3519:56cbc035b74b 3520:c3dcb80bdb1d
    13 	set(HW_DEV true)
    13 	set(HW_DEV true)
    14 	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) 
    14 	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) 
    15 		FIND_PROGRAM(HGCOMMAND hg)
    15 		FIND_PROGRAM(HGCOMMAND hg)
    16 		IF(HGCOMMAND)
    16 		IF(HGCOMMAND)
    17 			exec_program(${HGCOMMAND} 
    17 			exec_program(${HGCOMMAND} 
    18 				     ARGS identify ${CMAKE_CURRENT_SOURCE_DIR}
    18 				     ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR}
    19 				     OUTPUT_VARIABLE version_suffix
    19 				     OUTPUT_VARIABLE version_suffix
    20 				     )
    20 				     )
    21 			STRING(REGEX REPLACE "(.*) +.*" "\\1" version_suffix ${version_suffix})
    21 			STRING(REGEX REPLACE "(.*) +(.*)" "\\2:\\1" version_suffix ${version_suffix})
    22 			MESSAGE(STATUS "Builing revision ${version_suffix}")
    22 			MESSAGE(STATUS "Builing revision ${version_suffix}")
    23 			set(version_suffix ".${version_suffix}")
    23 			set(version_suffix ".${version_suffix}")
    24 #			#truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019
    24 #			#truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019
    25 #			STRING(REGEX REPLACE "^\\.(\\d+)" ".\\1" version_suffix ${version_suffix})
    25 #			STRING(REGEX REPLACE "^\\.(\\d+)" ".\\1" version_suffix ${version_suffix})
    26 #			# screw whole suffix if there's no number
    26 #			# screw whole suffix if there's no number