Add missing package name suffix to CMake/CPack

Fixes e98e0a64e69716e069604c3f95f1e5070bbea842

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel 2023-10-05 11:04:22 +02:00 committed by Jamie Reece Wilson
parent e562548ed6
commit 0ccc12a669

View File

@ -300,6 +300,15 @@ else()
set(DISTRO_PACK_PATH ${CMAKE_SYSTEM_NAME}/) set(DISTRO_PACK_PATH ${CMAKE_SYSTEM_NAME}/)
endif() endif()
# make sure untagged versions get a different package name
execute_process(COMMAND git describe --exact-match --tags ERROR_QUIET RESULT_VARIABLE REPO_HAS_TAG)
if(REPO_HAS_TAG EQUAL 0)
set(PACKAGE_NAME_SUFFIX "")
else()
set(PACKAGE_NAME_SUFFIX "-git")
message(STATUS "Use -git suffix")
endif()
# default CPack generators # default CPack generators
set(CPACK_GENERATOR TGZ STGZ) set(CPACK_GENERATOR TGZ STGZ)