Improved generated package name

This commit is contained in:
Daniel Wolf 2016-08-11 16:56:13 +02:00
parent e304a741ee
commit 056da65d03
1 changed files with 6 additions and 0 deletions

View File

@ -264,11 +264,17 @@ set(CPACK_PACKAGE_NAME ${appName})
string(REPLACE " " "-" CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") string(REPLACE " " "-" CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(CPACK_SYSTEM_NAME "OSX") set(CPACK_SYSTEM_NAME "OSX")
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
set(CPACK_SYSTEM_NAME "Win32")
else()
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
endif() endif()
set(CPACK_PACKAGE_VERSION_MAJOR ${appVersionMajor}) set(CPACK_PACKAGE_VERSION_MAJOR ${appVersionMajor})
set(CPACK_PACKAGE_VERSION_MINOR ${appVersionMinor}) set(CPACK_PACKAGE_VERSION_MINOR ${appVersionMinor})
set(CPACK_PACKAGE_VERSION_PATCH ${appVersionPatch}) set(CPACK_PACKAGE_VERSION_PATCH ${appVersionPatch})
set(CPACK_PACKAGE_VERSION ${appVersion}) set(CPACK_PACKAGE_VERSION ${appVersion})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
string(TOLOWER "${CPACK_PACKAGE_FILE_NAME}" CPACK_PACKAGE_FILE_NAME)
set(CPACK_GENERATOR ZIP) set(CPACK_GENERATOR ZIP)
# Copy resource files at build time; install them at package time # Copy resource files at build time; install them at package time