• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/odhcp6c/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 set(SOURCES src/odhcp6c.c src/dhcpv6.c src/ra.c src/script.c)
 19 
 20 set(LIBRARIES resolv)
 21 
 22 if(USE_LIBUBOX)
 23         add_definitions(-DUSE_LIBUBOX)
 24         set(LIBRARIES ${LIBRARIES} ubox)
 25         FIND_PATH(ubox_include_dir libubox/md5.h)
 26         INCLUDE_DIRECTORIES(${ubox_include_dir})
 27 else()
 28         set(SOURCES ${SOURCES} src/md5.c)
 29 endif()
 30 
 31 add_executable(odhcp6c ${SOURCES})
 32 
 33 target_link_libraries(odhcp6c ${LIBRARIES})
 34 
 35 # Installation
 36 install(TARGETS odhcp6c DESTINATION sbin/)
 37 
 38 # Packaging information
 39 set(CPACK_PACKAGE_VERSION "1")
 40 set(CPACK_PACKAGE_CONTACT "Steven Barth <steven@midlink.org>")
 41 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "6ac")
 42 set(CPACK_GENERATOR "DEB;RPM;STGZ")
 43 set(CPACK_STRIP_FILES true)
 44 
 45 SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
 46 set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}")
 47 
 48 include(CPack)
 49 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt