-
Notifications
You must be signed in to change notification settings - Fork 8
/
CPack.cmake
108 lines (100 loc) · 4.48 KB
/
CPack.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
if(WIN32)
set(CPACK_GENERATOR "WIX;NSIS")
else()
set(CPACK_GENERATOR "DEB") # RPM works too
endif()
set(CPACK_MONOLITHIC_INSTALL ON)
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "Valhalla")
set(CPACK_PACKAGE_CONTACT "Valhalla")
set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME})
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_CHECKSUM SHA3_256)
set(CPACK_PACKAGE_RELOCATABLE ON)
set(CPACK_PACKAGE_EXECUTABLES "conspiracy;Conspiracy")
set(CPACK_CREATE_DESKTOP_LINKS ${CPACK_PACKAGE_EXECUTABLES})
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/${PROJECT_NAME}/")
#set(CPACK_INSTALL_COMMANDS "")
#set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "")
#set(CPACK_RESOURCE_FILE_LICENSE "")
#set(CPACK_RESOURCE_FILE_README "")
#set(CPACK_RESOURCE_FILE_WELCOME "") # for Windows and MacOS X
#set(CPACK_PACKAGE_ICON "")
#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "")
#set(CPACK_PACKAGE_DESCRIPTION_FILE "")
# ------------------------------
# NSIS
# ------------------------------
set(CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_NSIS_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_NSIS_INSTALL_ROOT $PROGRAMFILES/${CPACK_PACKAGE_VENDOR})
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_HELP_LINK ${PACKAGE_SUPPORT_URL})
set(CPACK_NSIS_URL_INFO_ABOUT ${PACKAGE_SUPPORT_URL})
set(CPACK_NSIS_CONTACT ${PACKAGE_SUPPORT_MAIL})
set(CPACK_NSIS_MENU_LINKS "conspiracy" "Conspiracy")
set(CPACK_NSIS_COMPRESSOR ZLIB) # Others: BZIP2, LZMA
set(CPACK_NSIS_EXECUTABLES_DIRECTORY conspiracy)
#set(CPACK_NSIS_CREATE_ICONS_EXTRA "")
#set(CPACK_NSIS_DELETE_ICONS_EXTRA "")
#set(CPACK_NSIS_MUI_FINISHPAGE_RUN "")
#set(CPACK_NSIS_MUI_ICON "")
#set(CPACK_NSIS_MUI_UNIICON "")
#set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "")
#set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "")
#set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "")
#set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "")
#set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "")
string(REPLACE "/" "\\\\" CPACK_NSIS_INSTALL_ROOT ${CPACK_NSIS_INSTALL_ROOT})
# ------------------------------
# WIX
# ------------------------------
#TODO: MUST SET THE GUIDs STATICALLY AND NEVER CHANGE AGAIN
#set(CPACK_WIX_UPGRADE_GUID "")
#set(CPACK_WIX_PRODUCT_GUID "")
set(CPACK_WIX_PROPERTY_ARPCOMMENTS ${CPACK_PACKAGE_NAME})
set(CPACK_WIX_PROPERTY_ARPHELPLINK ${PACKAGE_SUPPORT_URL})
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT ${PACKAGE_SUPPORT_URL})
set(CPACK_WIX_PROPERTY_ARPURLUPDATEINFO ${PACKAGE_SUPPORT_URL})
set(CPACK_WIX_PROPERTY_ARPHELPTELEPHONE ${PACKAGE_SUPPORT_MAIL})
#set(CPACK_WIX_PROPERTY_ARPSIZE "30000") # Size (in kilobytes) of the application
#set(CPACK_WIX_PRODUCT_ICON "")
#set(CPACK_WIX_UI_BANNER "") # must be 493x58 pixels
#set(CPACK_WIX_UI_DIALOG "") # background for installer
set(CPACK_WIX_PROGRAM_MENU_FOLDER ${CPACK_PACKAGE_NAME})
#set(CPACK_WIX_CULTURES "") # Languages to be used
#set(CPACK_WIX_TEMPLATE "")
#set(CPACK_WIX_PATCH_FILE "")
#set(CPACK_WIX_EXTRA_SOURCES "")
#set(CPACK_WIX_EXTRA_OBJECTS "")
list(APPEND CPACK_WIX_EXTENSIONS WixUIExtension WixUtilExtension)
set(CPACK_WIX_ROOT_FEATURE_TITLE ${CPACK_WIX_PROPERTY_ARPCOMMENTS})
set(CPACK_WIX_ROOT_FEATURE_DESCRIPTION ${CPACK_WIX_PROPERTY_ARPCOMMENTS})
# ------------------------------
# DEB
# ------------------------------
set(CPACK_DEBIAN_PACKAGE_RELEASE "linux") # Release version is this project version, use then dummy value here
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_DEBIAN_PACKAGE_SECTION games)
set(CPACK_DEBIAN_COMPRESSION_TYPE gzip) # Others: xz, bzip2, lzma
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PACKAGE_SUPPORT_URL})
set(CPACK_DEBIAN_PACKAGE_PRIORITY optional) # Not-standard Debian Package (not installed by default in a system)
# ------------------------------
# RPM
# ------------------------------
set(CPACK_RPM_PACKAGE_ARCHITECTURE amd64)
set(CPACK_RPM_PACKAGE_RELEASE "linux") # Release version is this project version, use then dummy value here
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) # Required by CentOS, Fedora
set(CPACK_RPM_PACKAGE_GROUP "game")
set(CPACK_RPM_DEFAULT_DIR_PERMISSIONS ${UNIX_DIRECTORY_PERMISSIONS})
set(CPACK_RPM_RELOCATION_PATHS ${CPACK_PACKAGING_INSTALL_PREFIX})
#set(CPACK_RPM_PACKAGE_LICENSE ${CPACK_RESOURCE_FILE_LICENSE})
set(CPACK_RPM_PACKAGE_URL ${PACKAGE_SUPPORT_URL})
set(CPACK_RPM_COMPRESSION_TYPE gzip) # Others: xz, bzip2, lzma
#set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "")
#set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "")
#set(CPACK_RPM_CHANGELOG_FILE "")
include(CPack)