Add GCC version to package filename on Linux

develop
lethosor 2015-11-07 18:07:48 -05:00
parent 91d5b74c3b
commit 178811af43
1 changed files with 4 additions and 1 deletions

@ -248,11 +248,14 @@ if (BUILD_DOCS)
endif()
# Packaging with CPack!
SET(DFHACK_PACKAGE_SUFFIX "")
IF(UNIX)
if(APPLE)
SET(CPACK_GENERATOR "ZIP;TBZ2")
else()
SET(CPACK_GENERATOR "TBZ2")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
SET(DFHACK_PACKAGE_SUFFIX "-gcc-${GCC_VERSION}")
endif()
ELSEIF(WIN32)
SET(CPACK_GENERATOR "ZIP")
@ -263,7 +266,7 @@ IF(APPLE)
ELSE()
set(DFHACK_PACKAGE_PLATFORM_NAME ${CMAKE_SYSTEM_NAME})
ENDIF()
set(CPACK_PACKAGE_FILE_NAME "dfhack-${DFHACK_VERSION}-${DFHACK_PACKAGE_PLATFORM_NAME}")
set(CPACK_PACKAGE_FILE_NAME "dfhack-${DFHACK_VERSION}-${DFHACK_PACKAGE_PLATFORM_NAME}${DFHACK_PACKAGE_SUFFIX}")
INCLUDE(CPack)
#INCLUDE(FindSphinx.cmake)