-
Notifications
You must be signed in to change notification settings - Fork 11
/
cpack-config.cmake
63 lines (58 loc) · 2.94 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(LIB_COMPONENTS pprinter_library layout_library license)
set(DEV_COMPONENTS pprinter_headers layout_headers cmake_config cmake_target)
set(DRIVER_COMPONENTS pprinter_driver layout_driver)
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}")
if("${CPACK_GTIRB_PPRINTER_PACKAGE}" STREQUAL "deb-lib")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb-pprinter")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL ${LIB_COMPONENTS})
if("${CPACK_DEBIAN_PACKAGE_RELEASE}" STREQUAL "focal")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"gcc, libstdc++6, libc6, libgcc1, libgtirb (=${CPACK_GTIRB_DEB_VERSION}), libboost-filesystem1.71.0, libcapstone-dev (=${CPACK_CAPSTONE_PKG_VERSION})"
)
else()
message(
SEND_ERROR "Unknown / missing value for CPACK_DEBIAN_PACKAGE_RELEASE.")
endif()
elseif("${CPACK_GTIRB_PPRINTER_PACKAGE}" STREQUAL "deb-lib-dbg")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb-pprinter-dbg")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL pprinter-debug-file layout-debug-file)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libgtirb-pprinter (=${CPACK_GTIRB_PPRINTER_DEB_VERSION})")
elseif("${CPACK_GTIRB_PPRINTER_PACKAGE}" STREQUAL "deb-dev")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb-pprinter-dev")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL ${DEV_COMPONENTS})
if("${CPACK_DEBIAN_PACKAGE_RELEASE}" STREQUAL "focal")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libstdc++6, libc6, libgcc1, libgtirb-dev (=${CPACK_GTIRB_DEB_VERSION}), libgtirb-pprinter (=${CPACK_GTIRB_PPRINTER_DEB_VERSION}), libboost-dev, libcapstone-dev (=${CPACK_CAPSTONE_PKG_VERSION})"
)
else()
message(
SEND_ERROR "Unknown / missing value for CPACK_DEBIAN_PACKAGE_RELEASE.")
endif()
elseif("${CPACK_GTIRB_PPRINTER_PACKAGE}" STREQUAL "deb-driver")
set(CPACK_DEBIAN_PACKAGE_NAME "gtirb-pprinter")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL ${DRIVER_COMPONENTS})
if("${CPACK_DEBIAN_PACKAGE_RELEASE}" STREQUAL "focal")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libstdc++6, libc6, libgcc1, libgtirb (=${CPACK_GTIRB_DEB_VERSION}), libgtirb-pprinter (=${CPACK_GTIRB_PPRINTER_DEB_VERSION}), libboost-filesystem1.71.0, libboost-program-options1.71.0, libcapstone-dev (=${CPACK_CAPSTONE_PKG_VERSION})"
)
else()
message(
SEND_ERROR "Unknown / missing value for CPACK_DEBIAN_PACKAGE_RELEASE.")
endif()
elseif("${CPACK_GTIRB_PPRINTER_PACKAGE}" STREQUAL "deb-driver-dbg")
set(CPACK_DEBIAN_PACKAGE_NAME "gtirb-pprinter-dbg")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL pprinter-driver-debug-file layout-driver-debug-file)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"gtirb-pprinter (=${CPACK_GTIRB_PPRINTER_DEB_VERSION})")
endif()