File: CMakeLists.txt

package info (click to toggle)
libssh 0.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,804 kB
  • sloc: ansic: 124,224; cpp: 421; xml: 226; sh: 206; makefile: 26; python: 9
file content (38 lines) | stat: -rw-r--r-- 1,009 bytes parent folder | download | duplicates (2)
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
project(test_server C)

if (WITH_SERVER AND UNIX AND NOT WIN32)

find_package(socket_wrapper)

set(server_SRCS
    main.c
)

add_library(testserver STATIC
            test_server.c
            default_cb.c
            sftpserver_cb.c
            testserver_common.c)
if (WITH_COVERAGE)
    append_coverage_compiler_flags_to_target(testserver)
endif (WITH_COVERAGE)

include_directories(${libssh_SOURCE_DIR}/include
                    ${libssh_BINARY_DIR}/include
                    ${libssh_BINARY_DIR})

if (ARGP_INCLUDE_DIR)
    include_directories(${ARGP_INCLUDE_DIR})
endif ()

if (UNIX AND NOT WIN32)
    add_executable(test_server ${server_SRCS})
    target_compile_options(test_server PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
    target_link_libraries(test_server
        PRIVATE testserver ${TORTURE_LINK_LIBRARIES} ${ARGP_LIBRARIES} util)
    if (WITH_COVERAGE)
        append_coverage_compiler_flags_to_target(test_server)
    endif (WITH_COVERAGE)
endif ()

endif (WITH_SERVER AND UNIX AND NOT WIN32)