mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-11 22:25:53 +08:00
Allow override of version number from build environment
This commit is contained in:
@@ -17,6 +17,19 @@
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
|
||||
# Version number for Synergy
|
||||
if(DEFINED ENV{SYNERGY_VERSION_MAJOR})
|
||||
set (VERSION_MAJOR $ENV{SYNERGY_VERSION_MAJOR})
|
||||
set (VERSION_MINOR $ENV{SYNERGY_VERSION_MINOR})
|
||||
set (VERSION_REV $ENV{SYNERGY_VERSION_PATCH})
|
||||
set (VERSION_STAGE $ENV{SYNERGY_VERSION_STAGE})
|
||||
else()
|
||||
message (WARNING "Synergy version number not set in build environment. Defaulting")
|
||||
set (VERSION_MAJOR 1)
|
||||
set (VERSION_MINOR 9)
|
||||
set (VERSION_REV 0)
|
||||
set (VERSION_STAGE git)
|
||||
endif()
|
||||
|
||||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||
set(SYNERGY_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
SYNERGY_VERSION_MAJOR = 1
|
||||
SYNERGY_VERSION_MINOR = 9
|
||||
SYNERGY_VERSION_PATCH = 0
|
||||
SYNERGY_VERSION_LABEL = git
|
||||
SYNERGY_VERSION_STAGE = git
|
||||
|
||||
Reference in New Issue
Block a user