Improve packaging: Include correct license files
[pingcheck] / CMakeLists.txt
1 # project: definitions
2 project(pingcheck)
3 set(VERSION 0.1)
4 set(TARGET ${PROJECT_NAME})
5
6 # CMake
7 if("${CMAKE_BUILD_TYPE}" STREQUAL "")
8    set(CMAKE_BUILD_TYPE     Debug)
9 endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
10 set(CMAKE_COLOR_MAKEFILE ON)
11 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
12
13 # compiler: add definitions and arguments to the compiler
14 add_definitions(
15     -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic
16     #-Werror
17     #-O2
18     -DVERSION_STRING=${VERSION}
19     -DPROJECT_NAME=\"${PROJECT_NAME}\"
20 )
21
22 # package: package information
23 set(CPACK_PACKAGE_VERSION ${VERSION})
24 set(CPACK_PACKAGE_CONTACT "Intra2net AG")
25 set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
26 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
27 set(CPACK_SOURCE_GENERATOR TGZ)
28 set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
29 set(CPACK_SOURCE_IGNORE_FILES
30     "~$"
31     "\\\\.git"
32     "build"
33     "build-rpm"
34 )
35 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
36
37 # build the application in the source directory
38 add_subdirectory(src)
39
40 include(CPack)