File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,14 @@ else()
225225 set (DISTRO_PACK_PATH ${CMAKE_SYSTEM_NAME} /)
226226endif ()
227227
228+ # make sure untagged versions get a different package name
229+ execute_process (COMMAND git describe --exact-match --tags RESULT_VARIABLE REPO_HAS_TAG)
230+ if (REPO_HAS_TAG EQUAL 0)
231+ set (PACKAGE_NAME_SUFFIX "" )
232+ else ()
233+ set (PACKAGE_NAME_SUFFIX "-git" )
234+ endif ()
235+
228236# default CPack generators
229237set (CPACK_GENERATOR TGZ STGZ)
230238
@@ -245,6 +253,7 @@ if(BUILD_SHARED_LIBS)
245253else ()
246254 set (CPACK_PACKAGE_NAME "${PROJECT_NAME} -devel" )
247255endif ()
256+ set (CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}${PACKAGE_NAME_SUFFIX} " )
248257set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION} )
249258set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath" )
250259set (CPACK_PACKAGE_VENDOR "libtom projects" )
You can’t perform that action at this time.
0 commit comments