From cf330c50e62fec76ab418cf3c73cbc5948a0dbe1 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Thu, 12 Jul 2018 21:16:59 +0200 Subject: [PATCH] cmake: add .rcX or .dev suffix to LWIP_VERSION_STRING --- src/Filelists.cmake | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Filelists.cmake b/src/Filelists.cmake index dee42241..cf8134bd 100644 --- a/src/Filelists.cmake +++ b/src/Filelists.cmake @@ -11,13 +11,24 @@ set(LWIP_VERSION_MAJOR "2") set(LWIP_VERSION_MINOR "0") set(LWIP_VERSION_REVISION "3") -# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ -# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */ +# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases +# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions +# Numbers 1..31 are reserved for release candidates set(LWIP_VERSION_RC "LWIP_RC_DEVELOPMENT") -set(LWIP_VERSION_STRING - "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}" -) +if ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}" + ) +elseif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_DEVELOPMENT") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.dev" + ) +else ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") + set(LWIP_VERSION_STRING + "${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.rc${LWIP_VERSION_RC}" + ) +endif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") # The minimum set of files needed for lwIP. set(lwipcore_SRCS