1 cmake_minimum_required(VERSION 2.6) 2 3 PROJECT(urngd) 4 INCLUDE(GNUInstallDirs) 5 INCLUDE (FindPkgConfig) 6 7 SET(URNGD_VERSION 1.0.2) 8 SET(JTEN_DIR 3rdparty/jitterentropy-rngd) 9 10 FIND_PATH(ubox_include_dir NAMES libubox/usock.h) 11 FIND_LIBRARY(ubox NAMES ubox) 12 INCLUDE_DIRECTORIES(${ubox_include_dir} ${JTEN_DIR}) 13 14 SET(CMAKE_C_FLAGS_DEBUG -DURNGD_DEBUG) 15 16 ADD_DEFINITIONS(-Wall -Werror -Wextra --std=gnu99 -DURNGD_VERSION="${URNGD_VERSION}") 17 ADD_DEFINITIONS(-Wno-unused-parameter) 18 19 ADD_EXECUTABLE(urngd 20 urngd.c 21 ${JTEN_DIR}/jitterentropy-base.c 22 ) 23 TARGET_LINK_LIBRARIES(urngd ${ubox}) 24 25 # jitter RNG must not be compiled with optimizations, _FORTIFY_SOURCE needs optimizations 26 SET_PROPERTY( 27 SOURCE ${JTEN_DIR}/jitterentropy-base.c 28 APPEND PROPERTY COMPILE_OPTIONS -U_FORTIFY_SOURCE -O0 29 ) 30 31 INSTALL(TARGETS urngd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}) 32 33 SET(REMOTE_ADDR 192.168.1.20) 34 ADD_CUSTOM_TARGET(upload 35 COMMAND scp ${CMAKE_BINARY_DIR}/urngd root@${REMOTE_ADDR}:/usr/sbin 36 )
This page was automatically generated by LXR 0.3.1. • OpenWrt