-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
CM_package.cmake
71 lines (62 loc) · 2.87 KB
/
CM_package.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
# DarkMark (C) 2019-2024 Stephane Charette <[email protected]>
IF (WIN32)
MESSAGE("Packaging for Windows requires the NSIS tools to be installed.")
ELSE ()
# Get the kernel name. This should give us a string such as "Linux".
EXECUTE_PROCESS (
COMMAND uname -s
OUTPUT_VARIABLE DM_UNAME_S
OUTPUT_STRIP_TRAILING_WHITESPACE )
# Get the machine hardware name. This should give us a string such as "x86_64" or "aarch64" (Jetson Nano for example).
EXECUTE_PROCESS (
COMMAND uname -m
OUTPUT_VARIABLE DM_UNAME_M
OUTPUT_STRIP_TRAILING_WHITESPACE )
# Get the name "Ubuntu".
EXECUTE_PROCESS (
COMMAND lsb_release --id
COMMAND cut -d\t -f2
OUTPUT_VARIABLE DM_LSB_ID
OUTPUT_STRIP_TRAILING_WHITESPACE )
# Get the version number "20.04".
EXECUTE_PROCESS (
COMMAND lsb_release --release
COMMAND cut -d\t -f2
OUTPUT_VARIABLE DM_LSB_REL
OUTPUT_STRIP_TRAILING_WHITESPACE )
ENDIF ()
SET (CPACK_PACKAGE_VENDOR "Stephane Charette")
SET (CPACK_PACKAGE_CONTACT "[email protected]")
SET (CPACK_PACKAGE_VERSION ${DM_VERSION})
SET (CPACK_PACKAGE_VERSION_MAJOR ${DM_VER_MAJOR})
SET (CPACK_PACKAGE_VERSION_MINOR ${DM_VER_MINOR})
SET (CPACK_PACKAGE_VERSION_PATCH ${DM_VER_PATCH})
SET (CPACK_PACKAGE_NAME "darkmark")
SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "darkmark")
SET (CPACK_PACKAGE_DESCRIPTION "darkmark")
IF (WIN32)
SET (CPACK_PACKAGE_FILE_NAME "darkmark-${DM_VERSION}-Windows-64")
SET (CPACK_NSIS_PACKAGE_NAME "DarkMark")
SET (CPACK_NSIS_DISPLAY_NAME "DarkMark v${DM_VERSION}")
SET (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\src-windows\\\\darkmark_logo.ico")
SET (CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\src-windows\\\\darkmark_logo.ico")
SET (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\src-windows\\\\darkmark_logo.ico")
SET (CPACK_NSIS_CONTACT "[email protected]")
SET (CPACK_NSIS_URL_INFO_ABOUT "https://www.ccoderun.ca/DarkMark/")
SET (CPACK_NSIS_HELP_LINK "https://www.ccoderun.ca/DarkMark/")
SET (CPACK_NSIS_MODIFY_PATH "ON")
SET (CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
SET (CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\darkmark_logo.ico")
SET (CPACK_GENERATOR "NSIS")
ELSE ()
SET (CPACK_PACKAGE_FILE_NAME "darkmark-${DM_VERSION}-${DM_UNAME_S}-${DM_UNAME_M}-${DM_LSB_ID}-${DM_LSB_REL}")
SET (CPACK_DEBIAN_PACKAGE_SECTION "other")
SET (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET (CPACK_DEBIAN_PACKAGE_DEPENDS "darkhelp")
SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "Stephane Charette <[email protected]>")
SET (CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/src-ubuntu/postinst;${CMAKE_CURRENT_SOURCE_DIR}/src-ubuntu/postrm")
SET (CPACK_GENERATOR "DEB")
ENDIF ()
SET (CPACK_SOURCE_IGNORE_FILES ".git" ".kdev4" "build/" "build_and_upload")
SET (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
INCLUDE (CPack)