-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCPackConfig.cmake
34 lines (22 loc) · 1.05 KB
/
CPackConfig.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
if (CPACK_GENERATOR MATCHES "TGZ")
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_HDR_GROUP "src")
set(CPACK_COMPONENT_SRC_GROUP "src")
elseif (CPACK_GENERATOR MATCHES "DEB")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_BIN_GROUP "bin")
set(CPACK_COMPONENT_HDR_GROUP "bin")
set(CPACK_COMPONENT_SRC_GROUP "src")
set(CPACK_COMPONENT_GROUP_BIN_DEPENDS hdr)
execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE ARCHITECTURE)
string(REPLACE "\n" "" ARCHITECTURE ${ARCHITECTURE})
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sergei Fundaev <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_SECTION "Science")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
elseif (CPACK_GENERATOR MATCHES "RPM")
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_BIN_GROUP "bin")
set(CPACK_COMPONENT_HDR_GROUP "bin")
set(CPACK_COMPONENT_SRC_GROUP "src")
endif ()