Fix String substitution when `DEV` flavour is built with a dirty local version both instances of -D were replaced with commit count

This commit is contained in:
lselter 2024-07-09 14:34:23 +01:00
parent e405e9140c
commit 695ba5d5db
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ function(git_describe_working_tree _var)
set(out "${out}-${res}-NOTFOUND")
endif()
if( "${out}" MATCHES "-D\$")
STRING(REPLACE "-D" "-${COMMIT_COUNT}-D" out "${out}")
STRING(REGEX REPLACE "-D\$" "-${COMMIT_COUNT}-D" out "${out}")
else()
set(out "${out}-${COMMIT_COUNT}")
endif()