| 1 |
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
| 2 |
set(CPACK_PACKAGE_VENDOR "DSDA-Doom maintainers") |
| 3 |
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This is a successor of prboom+ with extra tooling for demo recording and playback, with a focus on speedrunning and quality of life.") |
| 4 |
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) |
| 5 |
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) |
| 6 |
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) |
| 7 |
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) |
| 8 |
set(CPACK_VERBATIM_VARIABLES YES) |
| 9 |
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/COPYING) |
| 10 |
|
| 11 |
if(WIN32) |
| 12 |
set(CPACK_GENERATOR ZIP) |
| 13 |
elseif(LINUX OR APPLE) |
| 14 |
set(CPACK_GENERATOR External TXZ) |
| 15 |
set(CPACK_EXTERNAL_ENABLE_STAGING TRUE) |
| 16 |
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME}Generator.cmake") |
| 17 |
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") |
| 18 |
set(CPACK_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) |
| 19 |
set(CPACK_BIN_DIR "${DSDA_INSTALL_BINDIR}") |
| 20 |
set(CPACK_PWAD_DIR "${DSDAPWADDIR}") |
| 21 |
set(CPACK_LICENSE_DIR "${DSDA_INSTALL_COPYRIGHT_DIR}") |
| 22 |
endif() |
| 23 |
|
| 24 |
set(target_arch ${CMAKE_SYSTEM_PROCESSOR}) |
| 25 |
if(CMAKE_GENERATOR MATCHES "Visual Studio") |
| 26 |
string(TOLOWER "${CMAKE_VS_PLATFORM_NAME}" target_arch) |
| 27 |
string(REPLACE "win32" "x86" target_arch "${target_arch}") |
| 28 |
elseif(CMAKE_OSX_ARCHITECTURES) |
| 29 |
list(JOIN CMAKE_OSX_ARCHITECTURES "-" target_arch) |
| 30 |
endif() |
| 31 |
|
| 32 |
string(TOLOWER "${CMAKE_SYSTEM_NAME}" platform_name) |
| 33 |
string(REPLACE "windows" "win" platform_name "${platform_name}") |
| 34 |
string(REPLACE "darwin" "mac" platform_name "${platform_name}") |
| 35 |
|
| 36 |
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-${platform_name}-${target_arch}") |
| 37 |
|
| 38 |
include(CPack) |