-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathCPackLists.txt
63 lines (55 loc) · 2.34 KB
/
CPackLists.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
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
# ==========================================================================
# 2020 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes
# with no warranties. This code is yours to share, use and modify with no
# strings attached and no restrictions or obligations.
#
# For more information see g3sinks/LICENSE or refer refer to
# http://unlicense.org
# ============================================================================*/
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES
"Darwin")
if(NOT CPACK_PACKAGING_INSTALL_PREFIX)
if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
else()
set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
endif()
endif()
endif()
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
set(CPACK_PACKAGE_NAME g3sinks)
set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${BUILD_NUMBER})
set(CPACK_PACKAGE_DESCRIPTION
"Asynchronous 'crash safe' logger
License: http://unlicense.org
Repository: https://github.com/KjellKod/g3sinks")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_PACKAGE_CONTACT "Kjell Hedstrom [email protected]")
set(CPACK_RESOURCE_FILE_LICENSE ${g3sinks_SOURCE_DIR}/LICENSE)
set(CPACK_PACKAGE_VENDOR "KjellKod")
set(CPACK_COMPONENTS_ALL libraries headers)
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "g3sinks libraries")
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "g3sinks C++ headers")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "KjellKod - Kjell Hedstrom")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(CPACK_GENERATOR "ZIP") # Otherwise, NSIS is needed.
endif()
message(STATUS "===== Installation locations =====")
message(STATUS "==================================")
message(
STATUS
"Headers: ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/g3sinks"
)
message(
STATUS
"Library installation directory: ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
)
# NOTE: to change installation locations you can use the settings below
# examples: CPACK_PACKAGING_INSTALL_PREFIX CPACK_OUTPUT_FILE_PREFIX
# CMAKE_INSTALL_PREFIX
include(CPack)