Add GCC version to OS X package names and remove trailing newlines

develop
lethosor 2015-11-07 20:27:48 -05:00
parent 99b93ecd11
commit 1e42f97e76
1 changed files with 3 additions and 2 deletions

@ -250,12 +250,13 @@ endif()
# Packaging with CPack! # Packaging with CPack!
SET(DFHACK_PACKAGE_SUFFIX "") SET(DFHACK_PACKAGE_SUFFIX "")
IF(UNIX) IF(UNIX)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
string(STRIP ${GCC_VERSION} GCC_VERSION)
SET(DFHACK_PACKAGE_SUFFIX "-gcc-${GCC_VERSION}")
if(APPLE) if(APPLE)
SET(CPACK_GENERATOR "ZIP;TBZ2") SET(CPACK_GENERATOR "ZIP;TBZ2")
else() else()
SET(CPACK_GENERATOR "TBZ2") SET(CPACK_GENERATOR "TBZ2")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
SET(DFHACK_PACKAGE_SUFFIX "-gcc-${GCC_VERSION}")
endif() endif()
ELSEIF(WIN32) ELSEIF(WIN32)
SET(CPACK_GENERATOR "ZIP") SET(CPACK_GENERATOR "ZIP")