From c04ea119002d890c7f3ea34c47983a10e4d884a4 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 14 Nov 2012 12:32:33 +0100 Subject: [PATCH] Add support for version suffix This adds the possibility to add a suffix like -rcx or -dev like described in https://github.com/FreeRDP/FreeRDP/wiki/Release-Guide --- CMakeLists.txt | 7 ++++++- config.h.in | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 503d7458f..900805781 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,13 @@ include(GNUInstallDirsWrapper) set(FREERDP_VERSION_MAJOR "1") set(FREERDP_VERSION_MINOR "1") set(FREERDP_VERSION_REVISION "0") +set(FREERDP_VERSION_SUFFIX "dev") set(FREERDP_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}") -set(FREERDP_VERSION_FULL "${FREERDP_VERSION}.${FREERDP_VERSION_REVISION}") +if (FREERDP_VERSION_SUFFIX) + set(FREERDP_VERSION_FULL "${FREERDP_VERSION}.${FREERDP_VERSION_REVISION}-${FREERDP_VERSION_SUFFIX}") +else() + set(FREERDP_VERSION_FULL "${FREERDP_VERSION}.${FREERDP_VERSION_REVISION}") +endif() include(GetGitRevisionDescription) git_describe(GIT_REVISION --match "[0-9]*" --abbrev=4 --tags --always) message(STATUS "Git Revision ${GIT_REVISION}") diff --git a/config.h.in b/config.h.in index e89aec95c..07c16e59d 100644 --- a/config.h.in +++ b/config.h.in @@ -1,11 +1,12 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define FREERDP_VERSION "${FREERDP_VERSION}" -#define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" #define FREERDP_VERSION_MAJOR ${FREERDP_VERSION_MAJOR} #define FREERDP_VERSION_MINOR ${FREERDP_VERSION_MINOR} #define FREERDP_VERSION_REVISION ${FREERDP_VERSION_REVISION} +#define FREERDP_VERSION_SUFFIX "${FREERDP_VERSION_SUFFIX}" +#define FREERDP_VERSION "${FREERDP_VERSION}" +#define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" #define GIT_REVISION "${GIT_REVISION}" #define FREERDP_DATA_PATH "${FREERDP_DATA_PATH}"