Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/SetKexiVersionInfo.cmake
1 | # Copyright (C) 2003-2016 Jarosław Staniek <staniek@kde.org> | 1 | # Copyright (C) 2003-2016 Jarosław Staniek <staniek@kde.org> | ||
---|---|---|---|---|---|
2 | # | 2 | # | ||
3 | # Redistribution and use is allowed according to the terms of the BSD license. | 3 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
4 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | 4 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
5 | 5 | | |||
6 | # Define common versions of Kexi components used to generate KexiVersion.h | 6 | # Define common versions of KEXI components used to generate KexiVersion.h | ||
7 | # update these version for every release: | 7 | # update these version for every release: | ||
8 | set(PROJECT_VERSION_STRING "3.2 Alpha") # Custom name such as "3.1 Alpha" | 8 | set(PROJECT_VERSION_STRING "3.2 Alpha") # Custom name such as "3.1 Alpha" | ||
9 | set(PROJECT_STABLE_VERSION_MAJOR 3) # 3 for 3.x, 4 for 4.x, etc. | 9 | set(PROJECT_STABLE_VERSION_MAJOR 3) # 3 for 3.x, 4 for 4.x, etc. | ||
10 | set(PROJECT_STABLE_VERSION_MINOR 2) # 0 for 3.0, 1 for 3.1, etc. | 10 | set(PROJECT_STABLE_VERSION_MINOR 2) # 0 for 3.0, 1 for 3.1, etc. | ||
11 | set(PROJECT_VERSION_RELEASE 90) # 90 for Alpha, increase for next test releases, set 0 for first Stable, etc. | 11 | set(PROJECT_VERSION_RELEASE 90) # 90 for Alpha, increase for next test releases, set 0 for first Stable, etc. | ||
12 | set(KEXI_ALPHA 1) # uncomment only for Alpha | 12 | set(KEXI_ALPHA 1) # uncomment only for Alpha | ||
13 | #set(KEXI_BETA 1) # uncomment only for Beta | 13 | #set(KEXI_BETA 1) # uncomment only for Beta | ||
14 | #set(KEXI_RC 1) # uncomment only for RC | 14 | #set(KEXI_RC 1) # uncomment only for RC | ||
15 | set(KEXI_YEAR 2018) # update every year | 15 | set(KEXI_YEAR 2018) # update every year | ||
16 | 16 | | |||
17 | # -- do not edit below this line -- | 17 | # -- do not edit below this line -- | ||
18 | 18 | | |||
19 | set(KEXI_CUSTOM_DISTRIBUTION_VERSION "" CACHE STRING | 19 | set(KEXI_CUSTOM_DISTRIBUTION_VERSION "" CACHE STRING | ||
20 | "Custom name of Kexi version useful to construct co-installabile releases. Any nonempty directory name is accepted. If specified it will be used in KEXI_DISTRIBUTION_VERSION. If not specified, KEXI_DISTRIBUTION_VERSION will be set to PROJECT_STABLE_VERSION_MAJOR.PROJECT_STABLE_VERSION_MINOR.") | 20 | "Custom name of KEXI version useful to construct co-installabile releases. Any nonempty directory name is accepted. If specified it will be used in KEXI_DISTRIBUTION_VERSION. If not specified, KEXI_DISTRIBUTION_VERSION will be set to PROJECT_STABLE_VERSION_MAJOR.PROJECT_STABLE_VERSION_MINOR.") | ||
21 | 21 | | |||
22 | if(KEXI_CUSTOM_DISTRIBUTION_VERSION STREQUAL "") | 22 | if(KEXI_CUSTOM_DISTRIBUTION_VERSION STREQUAL "") | ||
23 | set(KEXI_DISTRIBUTION_VERSION "${PROJECT_STABLE_VERSION_MAJOR}.${PROJECT_STABLE_VERSION_MINOR}") | 23 | set(KEXI_DISTRIBUTION_VERSION "${PROJECT_STABLE_VERSION_MAJOR}.${PROJECT_STABLE_VERSION_MINOR}") | ||
24 | else() | 24 | else() | ||
25 | set(KEXI_DISTRIBUTION_VERSION "${KEXI_CUSTOM_DISTRIBUTION_VERSION}") | 25 | set(KEXI_DISTRIBUTION_VERSION "${KEXI_CUSTOM_DISTRIBUTION_VERSION}") | ||
26 | endif() | 26 | endif() | ||
27 | 27 | | |||
28 | # Relative path name useful to construct co-installabile file names and paths | 28 | # Relative path name useful to construct co-installabile file names and paths | ||
Show All 27 Lines | |||||
56 | if(DEFINED KEXI_STABLE) | 56 | if(DEFINED KEXI_STABLE) | ||
57 | set(PROJECT_STABLE_VERSION_RELEASE ${PROJECT_VERSION_RELEASE}) | 57 | set(PROJECT_STABLE_VERSION_RELEASE ${PROJECT_VERSION_RELEASE}) | ||
58 | else() | 58 | else() | ||
59 | set(PROJECT_STABLE_VERSION_RELEASE 0) | 59 | set(PROJECT_STABLE_VERSION_RELEASE 0) | ||
60 | endif() | 60 | endif() | ||
61 | 61 | | |||
62 | set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_RELEASE}) | 62 | set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_RELEASE}) | ||
63 | 63 | | |||
64 | message(STATUS "Kexi version \"${PROJECT_VERSION_STRING}\" (${PROJECT_VERSION}), distribution version \"${KEXI_DISTRIBUTION_VERSION}\"") | 64 | message(STATUS "KEXI version \"${PROJECT_VERSION_STRING}\" (${PROJECT_VERSION}), distribution version \"${KEXI_DISTRIBUTION_VERSION}\"") | ||
65 | 65 | | |||
66 | # Define the generic version of the Kexi libraries here | 66 | # Define the generic version of the KEXI libraries here | ||
67 | # This makes it easy to advance it when the next Kexi release comes. | 67 | # This makes it easy to advance it when the next KEXI release comes. | ||
68 | # 14 was the last GENERIC_PROJECT_LIB_VERSION_MAJOR of the previous Kexi series | 68 | # 14 was the last GENERIC_PROJECT_LIB_VERSION_MAJOR of the previous KEXI series | ||
69 | # (2.x) so we're starting with 15 in 3.x series. | 69 | # (2.x) so we're starting with 15 in 3.x series. | ||
70 | if(PROJECT_STABLE_VERSION_MAJOR EQUAL 3) | 70 | if(PROJECT_STABLE_VERSION_MAJOR EQUAL 3) | ||
71 | math(EXPR GENERIC_PROJECT_LIB_VERSION_MAJOR "${PROJECT_STABLE_VERSION_MINOR} + 15") | 71 | math(EXPR GENERIC_PROJECT_LIB_VERSION_MAJOR "${PROJECT_STABLE_VERSION_MINOR} + 15") | ||
72 | else() | 72 | else() | ||
73 | # let's make sure we won't forget to update the "15" | 73 | # let's make sure we won't forget to update the "15" | ||
74 | message(FATAL_ERROR "Reminder: please update offset == 15 used to compute GENERIC_PROJECT_LIB_VERSION_MAJOR to something bigger") | 74 | message(FATAL_ERROR "Reminder: please update offset == 15 used to compute GENERIC_PROJECT_LIB_VERSION_MAJOR to something bigger") | ||
75 | endif() | 75 | endif() | ||
76 | set(GENERIC_PROJECT_LIB_VERSION "${GENERIC_PROJECT_LIB_VERSION_MAJOR}.0.0") | 76 | set(GENERIC_PROJECT_LIB_VERSION "${GENERIC_PROJECT_LIB_VERSION_MAJOR}.0.0") | ||
77 | set(GENERIC_PROJECT_LIB_SOVERSION "${GENERIC_PROJECT_LIB_VERSION_MAJOR}") | 77 | set(GENERIC_PROJECT_LIB_SOVERSION "${GENERIC_PROJECT_LIB_VERSION_MAJOR}") |