diff --git a/CMakeLists.txt b/CMakeLists.txt index f28de9571..59ad00543 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,11 @@ else() message(FATAL_ERROR "Couldn't parse version from src/game/version.h") endif() -project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +if(VERSION_PATCH STREQUAL "0") + project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}) +else() + project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +endif() set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) set(ORIGINAL_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})