gravatar
ladanyi@tmit.bme.hu
ladanyi@tmit.bme.hu
Use only a single (cached) variable to hold the version number.
0 1 0
default
1 file changed with 3 insertions and 15 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
1 1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 2

	
3
#EXECUTE_PROCESS(
4
#  COMMAND hg id -i
5
#  OUTPUT_VARIABLE HG_REVISION
6
#  OUTPUT_STRIP_TRAILING_WHITESPACE)
7

	
8 3
SET(PROJECT_NAME "LEMON")
9
SET(PROJECT_VERSION_MAJOR "0")
10
SET(PROJECT_VERSION_MINOR "99")
11
SET(PROJECT_VERSION_PATCH "0")
12
SET(PROJECT_VERSION
13
  "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
4
SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
14 5

	
15 6
PROJECT(${PROJECT_NAME})
16 7

	
... ...
@@ -39,15 +30,12 @@
39 30
    "LEMON - Library of Efficient Models and Optimization in Networks")
40 31
  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
41 32

	
42
  SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
43
  SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
44
  SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
45 33
  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
46 34

	
47 35
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
48
    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
36
    "${PROJECT_NAME} ${PROJECT_VERSION}")
49 37
  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
50
    "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
38
    "${PROJECT_NAME} ${PROJECT_VERSION}")
51 39

	
52 40
  # Variables to generate a component-based installer.
53 41
  #SET(CPACK_COMPONENTS_ALL headers library html_documentation)
0 comments (0 inline)