Use only a single (cached) variable to hold the version number.
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Sun, 21 Sep 2008 18:23:07 +0100
changeset 2742a33883915bb
parent 266 112ed801139d
child 275 0821fea54d53
Use only a single (cached) variable to hold the version number.
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Sun Sep 21 14:46:01 2008 +0100
     1.2 +++ b/CMakeLists.txt	Sun Sep 21 18:23:07 2008 +0100
     1.3 @@ -1,16 +1,7 @@
     1.4  CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
     1.5  
     1.6 -#EXECUTE_PROCESS(
     1.7 -#  COMMAND hg id -i
     1.8 -#  OUTPUT_VARIABLE HG_REVISION
     1.9 -#  OUTPUT_STRIP_TRAILING_WHITESPACE)
    1.10 -
    1.11  SET(PROJECT_NAME "LEMON")
    1.12 -SET(PROJECT_VERSION_MAJOR "0")
    1.13 -SET(PROJECT_VERSION_MINOR "99")
    1.14 -SET(PROJECT_VERSION_PATCH "0")
    1.15 -SET(PROJECT_VERSION
    1.16 -  "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
    1.17 +SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
    1.18  
    1.19  PROJECT(${PROJECT_NAME})
    1.20  
    1.21 @@ -39,15 +30,12 @@
    1.22      "LEMON - Library of Efficient Models and Optimization in Networks")
    1.23    SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
    1.24  
    1.25 -  SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
    1.26 -  SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
    1.27 -  SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
    1.28    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    1.29  
    1.30    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    1.31 -    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
    1.32 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.33    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    1.34 -    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
    1.35 +    "${PROJECT_NAME} ${PROJECT_VERSION}")
    1.36  
    1.37    # Variables to generate a component-based installer.
    1.38    #SET(CPACK_COMPONENTS_ALL headers library html_documentation)