Fix alignment of hash buffer in dhcpv6_response_is_valid
[odhcp6c.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2 cmake_policy(SET CMP0015 NEW)
3
4 # Project Definition
5 project(odhcp6c C)
6 set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
7 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99")
8 add_definitions(-D_GNU_SOURCE -Wall -Werror -Wextra -pedantic)
9
10 if(${EXT_PREFIX_CLASS})
11         add_definitions(-DEXT_PREFIX_CLASS=${EXT_PREFIX_CLASS})
12 endif(${EXT_PREFIX_CLASS})
13
14 if(${EXT_CER_ID})
15         add_definitions(-DEXT_CER_ID=${EXT_CER_ID})
16 endif(${EXT_CER_ID})
17
18 add_executable(odhcp6c src/odhcp6c.c src/dhcpv6.c src/ra.c src/script.c src/md5.c)
19 target_link_libraries(odhcp6c resolv)
20
21 # Installation
22 install(TARGETS odhcp6c DESTINATION sbin/)
23
24 # Packaging information
25 set(CPACK_PACKAGE_VERSION "1")
26 set(CPACK_PACKAGE_CONTACT "Steven Barth <steven@midlink.org>")
27 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "6ac")
28 set(CPACK_GENERATOR "DEB;RPM;STGZ")
29 set(CPACK_STRIP_FILES true)
30
31 SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
32 set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}")
33
34 include(CPack)
35