forked from GrammaTech/ddisasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpack-config.cmake
42 lines (39 loc) · 2.07 KB
/
cpack-config.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
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_DDISASM_DEB_VERSION
"${CPACK_DDISASM_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}")
set(CPACK_GTIRB_PPRINTER_DEB_VERSION
"${CPACK_GTIRB_PPRINTER_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}")
set(CPACK_GTIRB_DEB_VERSION
"${CPACK_GTIRB_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}")
set(CPACK_DDISASM_SUFFIX "")
set(CPACK_GTIRB_PPRINTER_SUFFIX "")
set(CPACK_GTIRB_SUFFIX "")
set(CPACK_CAPSTONE_SUFFIX "")
# Debian packages
if(CPACK_DDISASM_STABLE_PKG_NAME)
set(CPACK_DDISASM_SUFFIX "-${CPACK_DDISASM_VERSION}")
set(CPACK_GTIRB_PPRINTER_SUFFIX "-${CPACK_GTIRB_PPRINTER_VERSION}")
set(CPACK_GTIRB_SUFFIX "-${CPACK_GTIRB_VERSION}")
set(CPACK_CAPSTONE_SUFFIX "-${CPACK_CAPSTONE_PKG_VERSION}")
endif()
if("${CPACK_DDISASM_PACKAGE}" STREQUAL "deb-ddisasm")
set(CPACK_DEBIAN_PACKAGE_NAME "ddisasm${CPACK_DDISASM_SUFFIX}")
set(CPACK_PACKAGE_FILE_NAME "ddisasm")
set(CPACK_COMPONENTS_ALL ddisasm)
if("${CPACK_DEBIAN_PACKAGE_RELEASE}" STREQUAL "focal")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libstdc++6, libc6, libgcc1, libgomp1, libgtirb${CPACK_GTIRB_SUFFIX} (=${CPACK_GTIRB_DEB_VERSION}), libgtirb-pprinter${CPACK_GTIRB_PPRINTER_SUFFIX} (=${CPACK_GTIRB_PPRINTER_DEB_VERSION}), libboost-filesystem1.71.0, libboost-program-options1.71.0, libcapstone-dev${CPACK_CAPSTONE_SUFFIX} (=${CPACK_CAPSTONE_PKG_VERSION})"
)
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libstdc++6, libc6, libgcc1, libgomp1, libgtirb${CPACK_GTIRB_SUFFIX} (=${CPACK_GTIRB_DEB_VERSION}), libgtirb-pprinter${CPACK_GTIRB_PPRINTER_SUFFIX} (=${CPACK_GTIRB_PPRINTER_DEB_VERSION}), libboost (>=1.67) | libboost1.67, libcapstone-dev${CPACK_CAPSTONE_SUFFIX} (=${CPACK_CAPSTONE_PKG_VERSION})"
)
endif()
elseif("${CPACK_DDISASM_PACKAGE}" STREQUAL "deb-debug")
set(CPACK_DEBIAN_PACKAGE_NAME "ddisasm-dbg${CPACK_DDISASM_SUFFIX}")
set(CPACK_PACKAGE_FILE_NAME "ddisasm-dbg")
set(CPACK_COMPONENTS_ALL debug-file)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"ddisasm${CPACK_DDISASM_SUFFIX} (=${CPACK_DDISASM_DEB_VERSION})")
endif()