Fix cmake

When downloaded as zip the build failed before.
pull/306/head
3d-gussner 2023-09-18 14:51:05 +02:00
parent a7286de016
commit 09bacabb05
1 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,11 @@ function(resolve_version_variables)
# PROJECT_VERSION_TIMESTAMP
if(NOT PROJECT_VERSION_TIMESTAMP)
git_head_commit_timestamp(timestamp)
set(ERRORS "GIT-NOTFOUND" "HEAD-FORMAT-NOTFOUND" "HEAD-HASH-NOTFOUND")
if(timestamp IN_LIST ERRORS)
# git not availibe, set fallback values
set(timestamp 1618221861) #2021-04-12 120421
endif()
set(PROJECT_VERSION_TIMESTAMP
"${timestamp}"
PARENT_SCOPE