-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
37 lines (34 loc) · 1.79 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
cmake_minimum_required(VERSION 2.8.12)
#
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition
# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE
# to Debug prior to calling PROJECT()
#
IF(DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ELSE()
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF()
#set(CMAKE_INSTALL_PREFIX=/usr/local)
#INSTALL(PROGRAMS src/bin/rklogger DESTINATION bin)
#SET(Boost_DEBUG 1)
#SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/usr/include/boost")
#SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/usr/include/boost/lib")
project(rklogger CXX)
add_definitions(-Wextra -Wall -pedantic)
FIND_PACKAGE(Boost 1.42 COMPONENTS program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
include_directories(lib)
link_directories(${Boost_LIBRARY_DIR})
add_subdirectory(lib)
add_subdirectory(src)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/src/rklogger DESTINATION bin)
add_subdirectory(doc)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/man/ DESTINATION share/man/man1)
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(CPACK_SOURCE_IGNORE_FILES "/bin/;/.svn/;/.git/;~$;/CMakeCache.txt;/CMakeFiles/;/CPackSourceConfig.cmake;/CPackConfig.cmake;/cmake_install.cmake;/Makefile;${CPACK_SOURCE_IGNORE_FILES}")
include(CPack)