cpack
[m6w6/libmemcached] / CPack.txt
1 # default options
2
3 macro(cpack_include_if GENERATOR)
4 message(STATUS "Checking ${GENERATOR} package configuration ...")
5 if(EXISTS ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
6 message(STATUS " Sourcing ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt")
7 include(${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
8 elseif(EXISTS ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
9 message(STATUS " Sourcing ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt")
10 include(${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
11 endif()
12 endmacro()
13
14 # shell installer
15 set(CPACK_BINARY_STGZ ${UNIX})
16
17 # binary archive
18 set(CPACK_BINARY_TBZ2 0)
19 set(CPACK_BINARY_TGZ ${UNIX})
20 set(CPACK_BINARY_TXZ 0)
21 set(CPACK_BINARY_TZ 0)
22 set(CPACK_BINARY_ZIP ${WIN32})
23 set(CPACK_BINARY_NSIS ${WIN32})
24 set(CPACK_BINARY_NUGET ${WIN32})
25
26 # source archive
27 set(CPACK_SOURCE_TBZ2 0)
28 set(CPACK_SOURCE_TGZ ${UNIX})
29 set(CPACK_SOURCE_TXZ 0)
30 set(CPACK_SOURCE_TZ 0)
31 set(CPACK_SOURCE_ZIP ${WIN32})
32
33 # project internals
34 set(CPACK_PACKAGE_LICENSE "BSD-3-Clause")
35 set(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
36 set(CPACK_PACKAGE_VENDOR "${PROJECT_CONTACT}")
37 set(CPACK_PACKAGE_DESCRIPTION
38 "libmemcached is an open source C/C++ client library and tools for the
39 memcached server (http://memcached.org/). It has been designed to be
40 light on memory usage, thread safe, and provide full access to server
41 side methods.")
42 set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
43 #set(CPACK_PACKAGE_CHECKSUM SHA1)
44 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
45 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
46 set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
47
48 set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
49
50 set(CPACK_PACKAGE_FILE_NAME
51 "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
52
53 set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
54
55 # dependencies
56 if(HAVE_LIBSASL)
57 string(APPEND CPACK_PACKAGE_DEPENDS " libsasl2")
58 endif()
59 if(HAVE_TBB)
60 string(APPEND CPACK_PACKAGE_DEPENDS " tbb")
61 endif()
62 if(HAVE_LIBEVENT)
63 string(APPEND CPACK_PACKAGE_DEPENDS " libevent")
64 endif()
65
66
67 # DEBs
68 if(EXISTS /usr/bin/dpkg)
69 cpack_include_if(DEB)
70 endif()
71
72 if(APPLE)
73 endif()
74
75 # BSDs
76 if(CMAKE_SYSTEM_NAME MATCHES BSD)
77 cpack_include_if(BSD)
78 endif()
79
80 # RPMs
81 if(EXISTS /usr/bin/dnf OR EXISTS /usr/bin/yum OR EXISTS /usr/bin/rpmbuild)
82 cpack_include_if(RPM)
83 endif()
84
85 # keep last
86 include(CPack)