mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 13:23:53 +00:00
Task #1333: Remove cmake git tag reading
This commit is contained in:
parent
0fe0dc33a6
commit
510b7f8505
1 changed files with 2 additions and 12 deletions
|
@ -36,18 +36,8 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||||
string(REGEX REPLACE "^openmw-[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_MINOR "${VERSION}")
|
string(REGEX REPLACE "^openmw-[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_MINOR "${VERSION}")
|
||||||
string(REGEX REPLACE "^openmw-[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_RELEASE "${VERSION}")
|
string(REGEX REPLACE "^openmw-[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_RELEASE "${VERSION}")
|
||||||
|
|
||||||
set(GIT_VERSION "${GIT_VERSION_MAJOR}.${GIT_VERSION_MINOR}.${GIT_VERSION_RELEASE}")
|
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
|
||||||
|
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
|
||||||
if(NOT ${OPENMW_VERSION} STREQUAL ${GIT_VERSION})
|
|
||||||
message(FATAL_ERROR "Silly Zini forgot to update the version again...")
|
|
||||||
else(NOT ${OPENMW_VERSION} STREQUAL ${GIT_VERSION})
|
|
||||||
set(OPENMW_VERSION_MAJOR ${GIT_VERSION_MAJOR})
|
|
||||||
set(OPENMW_VERSION_MINOR ${GIT_VERSION_MINOR})
|
|
||||||
set(OPENMW_VERSION_RELEASE ${GIT_VERSION_RELEASE})
|
|
||||||
|
|
||||||
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
|
|
||||||
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
|
|
||||||
endif(NOT ${OPENMW_VERSION} STREQUAL ${GIT_VERSION})
|
|
||||||
|
|
||||||
message(STATUS "OpenMW version ${OPENMW_VERSION}")
|
message(STATUS "OpenMW version ${OPENMW_VERSION}")
|
||||||
else(MATCH)
|
else(MATCH)
|
||||||
|
|
Loading…
Reference in a new issue