Skip to content

Commit

Permalink
CMake: Pad minor version with 0 to two digits
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuch committed Jun 17, 2021
1 parent 4f66912 commit 5285a01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,13 @@ endif()
if(${PROJECT_VERSION_PATCH} LESS 10)
set(CHARM_VERSION_PATCH_PREFIX 0)
endif()
set(CHARM_VERSION "${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${CHARM_VERSION_PATCH_PREFIX}${PROJECT_VERSION_PATCH}")
if(${PROJECT_VERSION_MINOR} LESS 10)
set(CHARM_VERSION_MINOR_PREFIX 0)
endif()
set(CHARM_VERSION "${PROJECT_VERSION_MAJOR}${CHARM_VERSION_MINOR_PREFIX}${PROJECT_VERSION_MINOR}${CHARM_VERSION_PATCH_PREFIX}${PROJECT_VERSION_PATCH}")

unset(CHARM_VERSION_PATCH_PREFIX)
unset(CHARM_VERSION_MINOR_PREFIX)

set(CHARM_PLATFORM "${NETWORK}-${CHARM_OS}-${CHARM_CPU}")

Expand Down

0 comments on commit 5285a01

Please sign in to comment.