forked from TheXTech/TheXTech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversion.cmake
32 lines (26 loc) · 1.13 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
# Major
set(THEXTECH_VERSION_1 1)
# Minor
set(THEXTECH_VERSION_2 3)
# Revision
set(THEXTECH_VERSION_3 5)
# Patch
set(THEXTECH_VERSION_4 1)
# Type of version: "-alpha","-beta","-dev", or "" aka "release"
set(THEXTECH_VERSION_REL "")
add_definitions(-DTHEXTECH_VERSION_1=${THEXTECH_VERSION_1})
add_definitions(-DTHEXTECH_VERSION_2=${THEXTECH_VERSION_2})
add_definitions(-DTHEXTECH_VERSION_3=${THEXTECH_VERSION_3})
add_definitions(-DTHEXTECH_VERSION_4=${THEXTECH_VERSION_4})
add_definitions(-DTHEXTECH_VERSION_REL=${THEXTECH_VERSION_REL})
set(THEXTECH_VERSION_STRING "${THEXTECH_VERSION_1}.${THEXTECH_VERSION_2}")
if(NOT ${THEXTECH_VERSION_3} EQUAL 0 OR NOT ${THEXTECH_VERSION_4} EQUAL 0)
string(CONCAT THEXTECH_VERSION_STRING "${THEXTECH_VERSION_STRING}" ".${THEXTECH_VERSION_3}")
endif()
if(NOT ${THEXTECH_VERSION_4} EQUAL 0)
string(CONCAT THEXTECH_VERSION_STRING "${THEXTECH_VERSION_STRING}" ".${THEXTECH_VERSION_4}")
endif()
if(NOT "${THEXTECH_VERSION_REL}" STREQUAL "")
string(CONCAT THEXTECH_VERSION_STRING "${THEXTECH_VERSION_STRING}" "${THEXTECH_VERSION_REL}")
endif()
message("== TheXTech version ${THEXTECH_VERSION_STRING} ==")