diff --git a/CMakeLists.txt b/CMakeLists.txt index 239ec7b94..def76ebf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ declare_cache_var(BUILD_SHARED_LIBS TRUE BOOL "Alias zenohc::lib target to zenoh # Setup project version # set(project_version "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -if(NOT DEFINED PROJECT_VERSION_TWEAK) +if(PROJECT_VERSION_TWEAK STREQUAL "") set(project_version "${project_version}") elseif(PROJECT_VERSION_TWEAK EQUAL 0) set(project_version "${project_version}-dev") diff --git a/install/CMakeLists.txt b/install/CMakeLists.txt index 027830cb2..3b9e64d98 100644 --- a/install/CMakeLists.txt +++ b/install/CMakeLists.txt @@ -114,7 +114,7 @@ set(CPACK_PACKAGE_NAME zenohc) if(NOT CPACK_PACKAGE_VERSION) set(SEM_VER "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") - if(NOT DEFINED PROJECT_VERSION_TWEAK) + if(PROJECT_VERSION_TWEAK STREQUAL "") set(CPACK_PACKAGE_VERSION ${SEM_VER}) elseif(PROJECT_VERSION_TWEAK EQUAL 0) set(CPACK_PACKAGE_VERSION "${SEM_VER}~dev-1")