1 # IMPORTANT: Do not add whitespaces between cmake commands! This will break
3 # Do set(CONTENTS) instead of set( CONTENTS ) or set (CONTENTS)
5 # cmake: required version
6 cmake_minimum_required (VERSION 2.6)
8 # cmake: set the directory where the executable will be placed
9 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
11 # cmake: set the directory where the make install places the executable
12 set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
14 # project: definitions
17 set(TARGET ${PROJECT_NAME})
19 # compiler: disable the full compiler output
20 set(CMAKE_VERBOSE_MAKEFILE OFF)
22 # compiler: build type
23 set(CMAKE_BUILD_TYPE Debug)
25 # compiler: add definitions and arguments to the compiler
27 -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic
30 -DVERSION_STRING=${VERSION}
31 -DPROJECT_NAME=\"${PROJECT_NAME}\"
34 # package: package information
35 set(CPACK_PACKAGE_VERSION ${VERSION})
36 set(CPACK_PACKAGE_CONTACT "Intra2net AG")
37 set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
38 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
39 set(CPACK_SOURCE_GENERATOR TGZ)
40 set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
41 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
43 # build the application in the source directory