-
Notifications
You must be signed in to change notification settings - Fork 38
/
cpack-config.cmake
39 lines (36 loc) · 1.55 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
# Global properties
set(CMAKE_PROJECT_HOMEPAGE_URL https://github.com/GrammaTech/gtirb)
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_DEB_COMPONENT_INSTALL ON)
# Reusable lists of components
set(LIB_COMPONENTS library license)
set(DEV_COMPONENTS headers proto_library cmake_config cmake_target)
# Debian packages
if("${CPACK_GTIRB_PACKAGE}" STREQUAL "debian-lib")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb")
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
"libstdc++6, libc6, libgcc1, libprotobuf17"
)
else()
message(
SEND_ERROR "Unknown / missing value for CPACK_DEBIAN_PACKAGE_RELEASE."
)
endif()
elseif("${CPACK_GTIRB_PACKAGE}" STREQUAL "debian-dev")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb-dev")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL ${DEV_COMPONENTS})
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libstdc++6, libc6, libgcc1, libgtirb (=${CPACK_GTIRB_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), libboost-dev (>=1.67) | libboost1.67-dev, libprotobuf-dev (>=${CPACK_PROTOBUF_VERSION_LOWER_BOUND}~), libprotobuf-dev (<<${CPACK_PROTOBUF_VERSION_UPPER_BOUND})"
)
elseif("${CPACK_GTIRB_PACKAGE}" STREQUAL "debian-debug")
set(CPACK_DEBIAN_PACKAGE_NAME "libgtirb-dbg")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_COMPONENTS_ALL debug-file)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libgtirb (=${CPACK_GTIRB_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE})"
)
endif()