CMakeLists.txt
changeset 8613 82c649dfc7c3
parent 8611 90f445317e8a
child 8614 5f74a047cf2c
--- a/CMakeLists.txt	Thu Feb 28 23:14:11 2013 +0100
+++ b/CMakeLists.txt	Fri Mar 01 00:06:05 2013 +0100
@@ -44,8 +44,7 @@
 #detect Mercurial revision (if present)
 if(NOT NOREVISION)
     set(default_build_type "DEBUG")
-    set(version_suffix "-development_version")
-    set(HW_DEV true)
+    set(HW_DEV true) #becomes isDevBuild
     find_program(HGCOMMAND hg)
     if(HGCOMMAND AND (EXISTS ${CMAKE_SOURCE_DIR}/.hg))
         execute_process(COMMAND ${HGCOMMAND} identify -in
@@ -57,13 +56,12 @@
         string(REGEX REPLACE "[^+]" "" HGCHANGED ${internal_version})
 
         string(REGEX REPLACE "[0-9a-zA-Z]+(.*) ([0-9]+)(.*)" "\\2" revision_number ${internal_version})
-        string(REGEX REPLACE "([0-9a-zA-Z]+)(.*) [0-9]+(.*)" "\\1" revision_hash ${internal_version})
+        string(REGEX REPLACE "([0-9a-zA-Z]+)(.*) [0-9]+(.*)" "\\1" hash_number ${internal_version})
 
-        message(STATUS "Building revision ${revision_number} from hash ${revision_hash} ${HGCHANGED}")
+        message(STATUS "Building revision ${revision_number} from hash ${hash_number}")
         if(HGCHANGED)
-            MESSAGE(${WARNING} "Notice: you have uncommitted changes in your repository")
+            MESSAGE(${WARNING} "You have uncommitted changes in your repository!")
         endif()
-        set(version_suffix "-${revision_number}${HGCHANGED}")
     endif()
 else(NOT NOREVISION)
     set(default_build_type "RELEASE")
@@ -75,7 +73,7 @@
 #versioning
 set(CPACK_PACKAGE_VERSION_MAJOR 0)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 19${version_suffix})
+set(CPACK_PACKAGE_VERSION_PATCH 19)
 set(HEDGEWARS_PROTO_VER 44)
 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")