-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
34 lines (26 loc) · 1.14 KB
/
CMakeLists.txt
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
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
PROJECT("dmarc" VERSION 1.1.0)
IF (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/CPACK_GENERATOR.txt")
FILE(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/CPACK_GENERATOR.txt CPACK_GENERATOR)
ELSE()
MESSAGE(FATAL_ERROR "Missing CPACK_GENERATOR")
ENDIF()
SET(CMAKE_INSTALL_PREFIX "/opt/halon")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/opt/halon")
INSTALL(FILES "LICENSE" DESTINATION "share/doc/plugins/hsl/${PROJECT_NAME}")
INSTALL(FILES "dmarc.hsl" DESTINATION "plugins/hsl/${PROJECT_NAME}")
INSTALL(FILES "main.hsl" DESTINATION "plugins/hsl/${PROJECT_NAME}")
IF (CPACK_GENERATOR MATCHES "DEB")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "halon (>= 5.10)")
ENDIF()
IF (CPACK_GENERATOR MATCHES "RPM")
SET(CPACK_RPM_PACKAGE_REQUIRES "halon >= 5.10")
ENDIF()
SET(CPACK_PACKAGE_NAME "halon-extras-${PROJECT_NAME}")
SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Halon extras DMARC")
SET(CPACK_PACKAGE_DESCRIPTION "Halon extras DMARC")
SET(CPACK_PACKAGE_CONTACT "Halon support@halon.io")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}")
SET(CPACK_DEBIAN_PACKAGE_SECTION "mail")
INCLUDE(CPack)