1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE -DUSE_SSL")
include_directories(
BEFORE
"../support/"
${CMAKE_CURRENT_SOURCE_DIR}
)
add_executable(
in.ftpd
ftpd.c
logutmp.c
logwtmp.c
popen.c
extern.h
ftpcmd.c
)
target_link_libraries(
in.ftpd
${USE_CRYPT}
support
ssl
crypto
${USE_PAM}
)
install(
TARGETS in.ftpd
DESTINATION ${SBIN_DIR}
)
add_custom_command(
COMMENT "Creating y.tab.c"
OUTPUT y.tab.c
COMMAND
yacc ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y
)
add_custom_command(
COMMENT "Creating ftpcmd.c"
OUTPUT ftpcmd.c
COMMAND
${CMAKE_COMMAND} -E rename
y.tab.c ftpcmd.c
DEPENDS y.tab.c
)
install(
FILES ftpd.8
DESTINATION ${MAN_DIR}/man8/
RENAME in.ftpd.8
)
install(
FILES ftpusers.5
DESTINATION ${MAN_DIR}/man5/
)
|