-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
30 lines (23 loc) · 982 Bytes
/
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
cmake_minimum_required(VERSION 2.6)
project(libsyslogpp)
find_package(Threads REQUIRED)
include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX("${header}" HAVE_CONFIG_H)
if (HAVE_CONFIG_H)
add_definitions(-DHAVE_CONFIG_H)
endif()
include_directories(src/)
add_library(syslogpp src/syslogpp.cpp)
add_library(syslogpp_r src/syslogpp_r.cpp)
set_target_properties(syslogpp syslogpp_r PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
install(TARGETS syslogpp syslogpp_r DESTINATION lib)
install(FILES src/syslogpp.h DESTINATION include)
install(FILES man/libsyslogpp.7 DESTINATION share/man/man7/)
install(FILES COPYING DESTINATION share/doc/libsyslogpp RENAME copyright)
install(FILES ChangeLog NEWS README AUTHORS DESTINATION share/doc/libsyslogpp)
set (CPACK_GENERATOR "DEB;RPM")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Yuri Dyachenko <[email protected]>")
set (CPACK_PACKAGE_VERSION_MAJOR "0")
set (CPACK_PACKAGE_VERSION_MINOR "7")
set (CPACK_PACKAGE_VERSION_PATCH "0")
include(CPack)