feat: display git describe version string in app if possible

This commit is contained in:
Gary Wang
2020-09-29 09:45:07 +08:00
parent 4c3e370f70
commit 7c39668eb6
4 changed files with 29 additions and 13 deletions

View File

@ -116,6 +116,9 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
)
string (REGEX REPLACE "\n" "" _git_describe_long "${_git_describe_long}")
ppic_set_version_via_describe(${_git_describe_long})
target_compile_definitions(${EXE_NAME} PRIVATE
GIT_DESCRIBE_VERSION_STRING="${_git_describe_long}"
)
endif ()
endif ()