File: CMakeLists.txt

package info (click to toggle)
linux-ftpd 0.17-36.2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 1,348 kB
  • sloc: ansic: 2,831; yacc: 1,248; makefile: 48; sh: 40
file content (56 lines) | stat: -rw-r--r-- 890 bytes parent folder | download
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

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE")

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_PAM}
    ${USE_CRYPT}
    support
)
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/
)