Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

fix cmake version var, missing ver patch #1609

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmake/K4AProjectVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ endfunction()

# Set the default version string if it wasn't defined in the build configuration
if (NOT DEFINED VERSION_STR)
set(VERSION_STR "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.0-private")
if (NOT PROJECT_VERSION_PATCH)
set(PROJECT_VERSION_PATCH 0)
endif()
set(VERSION_STR "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}-private")
endif()

set(SEMVER_REGEX "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-([a-zA-Z0-9\\._]+))?(\\+([a-zA-Z0-9\\._]+))?$")
Expand All @@ -36,7 +39,7 @@ set(K4A_VERSION_MAJOR ${CMAKE_MATCH_1})
set(K4A_VERSION_MINOR ${CMAKE_MATCH_2})
set(K4A_VERSION_PATCH ${CMAKE_MATCH_3})
set(K4A_VERSION_PRERELEASE ${CMAKE_MATCH_5})
set(K4A_VERSION_BUILDMETADATA ${CMAKE_MATCH_7})
set(K4A_VERSION_BUILD_METADATA ${CMAKE_MATCH_7})
set(K4A_VERSION_STR ${VERSION_STR})

if (NOT K4A_VERSION_REVISION)
Expand Down