diff --git a/CMakeLists.txt b/CMakeLists.txt index b62298b..57d0fd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) include(helpers) 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 ec31af9..da3e221 100644 --- a/install/CMakeLists.txt +++ b/install/CMakeLists.txt @@ -61,7 +61,7 @@ set(CPACK_PACKAGE_NAME zenohcpp) 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")