mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
cpack should get shorter version name as well
This commit is contained in:
parent
325371331d
commit
636fdeba70
|
@ -19,13 +19,21 @@ endif()
|
|||
|
||||
if(POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
if(VERSION_PATCH STREQUAL "0")
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||
else()
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
endif()
|
||||
else()
|
||||
project(DDNet)
|
||||
set(PROJECT_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(PROJECT_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(PROJECT_VERSION_PATCH ${VERSION_PATCH})
|
||||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
if(VERSION_PATCH STREQUAL "0")
|
||||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||
else()
|
||||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
@ -1187,7 +1195,11 @@ set(CPACK_SOURCE_GENERATOR ZIP TGZ TBZ2 TXZ)
|
|||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
if(VERSION_PATCH STREQUAL "0")
|
||||
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
|
||||
else()
|
||||
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
endif()
|
||||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
|
||||
if(TARGET_OS AND TARGET_BITS)
|
||||
|
|
Loading…
Reference in a new issue