-
Notifications
You must be signed in to change notification settings - Fork 9
/
CPackLists.txt
81 lines (61 loc) · 3.02 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# INSTALL( TARGETS StopWatch
# ARCHIVE
# LIBRARY DESTINATION lib/StopWatch
# COMPONENT libraries)
# INSTALL( FILES ${HEADER_FILES}
# DESTINATION include
# COMPONENT headers)
IF (NOT DEFINED ${CPACK_INSTALL_PREFIX})
SET(CPACK_INSTALL_PREFIX "/usr/local")
ENDIF()
SET(CPACK_PACKAGE_NAME LRStopWatch)
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 "LRStopWatch is a library with utilities around time expiration and timing.
StopWatch: is a wrapper around the std::chrono API for easy time expiration retrieval.
AlarmClock: is a high Performance Timer.
The AlarmClock has a low CPU clock cycle cost to retrieve the status for time expiration.
The AlarmClock is suitable where retrieval of elapsed time, using std::chrono, is considered too expensive.
MIT License. Copyright (c) 2014 LogRhythm.
Repository: https://github.com/LogRhythm/StopWatch")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION})
SET(CPACK_PACKAGE_CONTACT "LogRhythm kjell.hedstrom@logrhythm.com")
SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SRC}/../LICENSE)
SET(CPACK_PACKAGE_VENDOR "LogRhythm")
SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SRC}/../LICENSE)
SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output dir for libraries")
SET(CMAKE_INSTALL_HEADERDIR include CACHE PATH "Output dir for headers")
INSTALL( TARGETS StopWatch
ARCHIVE DESTINATION ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries)
INSTALL( FILES ${HEADER_FILES}
DESTINATION ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_HEADERDIR}
COMPONENT headers)
SET(CPACK_COMPONENTS_ALL libraries headers)
SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "LRStopWatch libraries")
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "LRStopWatch C++ headers")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "LogRhythm")
MESSAGE("\nTo create installation package: ")
MESSAGE("make package")
ENDIF()
MESSAGE("\nOption to install using 'sudo make install")
MESSAGE("Installation locations: ")
MESSAGE("====================")
MESSAGE("Headers: ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_HEADERDIR}")
MESSAGE("Library : ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
MESSAGE("For more information please see StopWatch/CPackLists.txt")
MESSAGE("To install: sudo dpkg -i LRStopWatch-<version>-Linux.deb")
MESSAGE("To list files in install package: sudo dpkg --contents RStopWatch-<version>-Linux.deb")
MESSAGE("To list installed files: sudo dpkg -L LRStopWatch")
MESSAGE("To remove: sudo dpkg -r LRStopWatch")
MESSAGE("To remove: sudo dpkg -r LRStopWatch")
# NOTE: to change installation locations you can use the settings below
# examples:
# CPACK_INSTALL_PREFIX
# CMAKE_INSTALL_HEADERDIR
# CMAKE_INSTALL_LIBDIR
INCLUDE(CPack)