forked from rpm-software-management/dnf5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VERSION.cmake
36 lines (32 loc) · 1.64 KB
/
VERSION.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
set(DEFAULT_PROJECT_VERSION_PRIME 5)
set(DEFAULT_PROJECT_VERSION_MAJOR 2)
set(DEFAULT_PROJECT_VERSION_MINOR 8)
set(DEFAULT_PROJECT_VERSION_MICRO 1)
if(DEFINED PROJECT_VERSION_PRIME)
if(NOT ${DEFAULT_PROJECT_VERSION_PRIME} STREQUAL ${PROJECT_VERSION_PRIME})
message(FATAL_ERROR "Variable DEFAULT_PROJECT_VERSION_PRIME=" ${DEFAULT_PROJECT_VERSION_PRIME} " in VERSION.cmake differs from PROJECT_VERSION_PRIME=" ${PROJECT_VERSION_PRIME} " in spec")
endif()
else()
set (VERSION_PRIME ${DEFAULT_PROJECT_VERSION_PRIME})
endif()
if(DEFINED PROJECT_VERSION_MAJOR)
if(NOT ${DEFAULT_PROJECT_VERSION_MAJOR} STREQUAL ${PROJECT_VERSION_MAJOR})
message(FATAL_ERROR "Variable DEFAULT_PROJECT_VERSION_MAJOR=" ${DEFAULT_PROJECT_VERSION_MAJOR} " in VERSION.cmake differs from PROJECT_VERSION_MAJOR=" ${PROJECT_VERSION_MAJOR} " in spec")
endif()
else()
set (VERSION_MAJOR ${DEFAULT_PROJECT_VERSION_MAJOR})
endif()
if(DEFINED PROJECT_VERSION_MINOR)
if(NOT ${DEFAULT_PROJECT_VERSION_MINOR} STREQUAL ${PROJECT_VERSION_MINOR})
message(FATAL_ERROR "Variable DEFAULT_PROJECT_VERSION_MINOR=" ${DEFAULT_PROJECT_VERSION_MINOR} " in VERSION.cmake differs from PROJECT_VERSION_MINOR=" ${PROJECT_VERSION_MINOR} " in spec")
endif()
else()
set (VERSION_MINOR ${DEFAULT_PROJECT_VERSION_MINOR})
endif()
if(DEFINED PROJECT_VERSION_MICRO)
if(NOT ${DEFAULT_PROJECT_VERSION_MICRO} STREQUAL ${PROJECT_VERSION_MICRO})
message(FATAL_ERROR "Variable DEFAULT_PROJECT_VERSION_MICRO=" ${DEFAULT_PROJECT_VERSION_MICRO} " in VERSION.cmake differs from PROJECT_VERSION_MICRO=" ${PROJECT_VERSION_MICRO} " in spec")
endif()
else()
set (VERSION_MICRO ${DEFAULT_PROJECT_VERSION_MICRO})
endif()