#6332 Make version number easier to update in Version.cmake
This commit is contained in:
parent
9b4d14e085
commit
1b0ab12c91
|
@ -3,37 +3,30 @@ cmake_minimum_required (VERSION 3.4)
|
||||||
#
|
#
|
||||||
# Synergy Version
|
# Synergy Version
|
||||||
#
|
#
|
||||||
if (NOT DEFINED SYNERGY_VERSION_MAJOR)
|
|
||||||
if (DEFINED ENV{SYNERGY_VERSION_MAJOR})
|
set (SYNERGY_VERSION_MAJOR 1)
|
||||||
|
set (SYNERGY_VERSION_MINOR 10)
|
||||||
|
set (SYNERGY_VERSION_PATCH 0)
|
||||||
|
set (SYNERGY_VERSION_STAGE "snapshot")
|
||||||
|
|
||||||
|
#
|
||||||
|
# Version from CI
|
||||||
|
#
|
||||||
|
|
||||||
|
if (DEFINED ENV{SYNERGY_VERSION_MAJOR})
|
||||||
set (SYNERGY_VERSION_MAJOR $ENV{SYNERGY_VERSION_MAJOR})
|
set (SYNERGY_VERSION_MAJOR $ENV{SYNERGY_VERSION_MAJOR})
|
||||||
else()
|
|
||||||
set (SYNERGY_VERSION_MAJOR 1)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED SYNERGY_VERSION_MINOR)
|
if (DEFINED ENV{SYNERGY_VERSION_MINOR})
|
||||||
if (DEFINED ENV{SYNERGY_VERSION_MINOR})
|
|
||||||
set (SYNERGY_VERSION_MINOR $ENV{SYNERGY_VERSION_MINOR})
|
set (SYNERGY_VERSION_MINOR $ENV{SYNERGY_VERSION_MINOR})
|
||||||
else()
|
|
||||||
set (SYNERGY_VERSION_MINOR 10)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED SYNERGY_VERSION_PATCH)
|
if (DEFINED ENV{SYNERGY_VERSION_PATCH})
|
||||||
if (DEFINED ENV{SYNERGY_VERSION_PATCH})
|
|
||||||
set (SYNERGY_VERSION_PATCH $ENV{SYNERGY_VERSION_PATCH})
|
set (SYNERGY_VERSION_PATCH $ENV{SYNERGY_VERSION_PATCH})
|
||||||
else()
|
|
||||||
set (SYNERGY_VERSION_PATCH 0)
|
|
||||||
message (WARNING "Synergy version wasn't set. Set to ${SYNERGY_VERSION_MAJOR}.${SYNERGY_VERSION_MINOR}.${SYNERGY_VERSION_PATCH}")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED SYNERGY_VERSION_STAGE)
|
if (DEFINED ENV{SYNERGY_VERSION_STAGE})
|
||||||
if (DEFINED ENV{SYNERGY_VERSION_STAGE})
|
|
||||||
set (SYNERGY_VERSION_STAGE $ENV{SYNERGY_VERSION_STAGE})
|
set (SYNERGY_VERSION_STAGE $ENV{SYNERGY_VERSION_STAGE})
|
||||||
else()
|
|
||||||
set (SYNERGY_VERSION_STAGE "snapshot")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED SYNERGY_REVISION)
|
if (NOT DEFINED SYNERGY_REVISION)
|
||||||
|
|
Loading…
Reference in New Issue