From afd74cc536b8e1b5f3f1b15364a6581465db6b94 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:24:48 +0200 Subject: [PATCH] feat: Support `x.y.z` project version numbers --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d236e99fe..35728830d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,10 +36,10 @@ declare_cache_var(ZENOHC_LIB_STATIC FALSE BOOL "Alias zenohc::lib target to zeno # set(project_version "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") if(NOT PROJECT_VERSION_TWEAK) + set(project_version "${project_version}") +elseif(PROJECT_VERSION_TWEAK EQUAL 0) set(project_version "${project_version}-dev") -elseif(PROJECT_VERSION_TWEAK EQUAL 1) - set(project_version "${project_version}-rc") -elseif(PROJECT_VERSION_TWEAK LESS 255) +elseif(PROJECT_VERSION_TWEAK GREATER 1) set(project_version "${project_version}-rc.${PROJECT_VERSION_TWEAK}") endif() status_print(project_version)