diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a569a47..54d829c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/Config.properties b/Config.properties index 0bc7c28f..2aaa42d5 100644 --- a/Config.properties +++ b/Config.properties @@ -4,4 +4,4 @@ SYNERGY_VERSION_MAJOR = 1 SYNERGY_VERSION_MINOR = 9 SYNERGY_VERSION_PATCH = 0 -SYNERGY_VERSION_LABEL = git +SYNERGY_VERSION_STAGE = git