This repository has been archived by the owner on Dec 17, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
CMakeLists.txt
87 lines (66 loc) · 1.89 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
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
82
83
84
85
86
87
project(libsysstat)
set (MAJOR_VERSION 0)
set (MINOR_VERSION 1)
set (PATCH_VERSION 0)
add_definitions(-DMAJOR_VERSION=${MAJOR_VERSION})
add_definitions(-DMINOR_VERSION=${MINOR_VERSION})
add_definitions(-DPATCH_VERSION=${PATCH_VERSION})
add_definitions(-DSYSSTAT_LIBRARY)
add_definitions(-Wall)
set(SYSSTAT_PUBLIC_HDRS
version.h
sysstat_global.h
basestat.h
cpustat.h
memstat.h
netstat.h
)
set(SYSSTAT_PRIVATE_HDRS
version_p.h
basestat_p.h
cpustat_p.h
memstat_p.h
netstat_p.h
)
set(SYSSTAT_SRCS
version.cpp
basestat.cpp
cpustat.cpp
memstat.cpp
netstat.cpp
)
set(SYSSTAT_MOCS
basestat.h
cpustat.h
memstat.h
netstat.h
basestat_p.h
cpustat_p.h
memstat_p.h
netstat_p.h
)
# Translations **********************************
file(GLOB SYSSTAT_TS_FILES
translations/*.ts
)
#************************************************
#**********************************************************
QT4_WRAP_CPP(SYSSTAT_CXX ${SYSSTAT_MOCS})
qt4_add_translation(SYSSTAT_QM_FILES ${SYSSTAT_TS_FILES})
if (NOT CMAKE_BUILD_TYPE)
set ( CMAKE_BUILD_TYPE Release )
endif (NOT CMAKE_BUILD_TYPE)
set(APP_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/sysstat)
include_directories( .. )
add_definitions(-DTRANSLATIONS_DIR=\"${APP_SHARE_DIR}\")
add_library(sysstat SHARED ${SYSSTAT_PUBLIC_HDRS} ${SYSSTAT_PRIVATE_HDRS} ${SYSSTAT_SRCS} ${SYSSTAT_CXX} ${SYSSTAT_QM_FILES})
target_link_libraries(sysstat ${QT_LIBRARIES})
set_target_properties(sysstat PROPERTIES
VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}
SOVERSION ${MAJOR_VERSION}
)
install(TARGETS sysstat DESTINATION lib${LIB_SUFFIX})
install(FILES ${SYSSTAT_PUBLIC_HDRS} DESTINATION include/sysstat)
install(FILES ${SYSSTAT_QM_FILES} DESTINATION ${APP_SHARE_DIR})
include(create_pkgconfig_file)
create_pkgconfig_file(sysstat "SysStat, a Qt-based interface to system statistics")