~ubuntu-branches/ubuntu/precise/libssh/precise

« back to all changes in this revision

Viewing changes to examples/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2011-06-15 15:48:07 UTC
  • mfrom: (1.1.10 upstream) (4.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20110615154807-3muklcqfftr1vtch
Tags: 0.5.0-2
* debian/patches/0002-Check-for-NULL-pointers-in-string-c.patch:
  Consolidate patch (Should fix previous REJECT)
* Support multiarch spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
project(libssh-examples C)
 
1
project(libssh-examples C CXX)
2
2
 
3
3
set(examples_SRCS
4
4
  authentication.c
8
8
 
9
9
include_directories(
10
10
  ${LIBSSH_PUBLIC_INCLUDE_DIRS}
11
 
  ${LIBSSH_PRIVATE_INCLUDE_DIRS}  
 
11
  ${CMAKE_BINARY_DIR}
12
12
)
13
13
 
14
 
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
15
 
add_executable(scp_download scp_download.c ${examples_SRCS})
16
 
add_executable(samplessh sample.c ${examples_SRCS})
 
14
if (LINUX)
 
15
    add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
 
16
    target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
 
17
 
 
18
    add_executable(scp_download scp_download.c ${examples_SRCS})
 
19
    target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
 
20
 
 
21
    add_executable(samplessh sample.c ${examples_SRCS})
 
22
    target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
 
23
 
 
24
    add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
 
25
    target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
 
26
 
 
27
    if (WITH_SFTP)
 
28
        add_executable(samplesftp samplesftp.c ${examples_SRCS})
 
29
        target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
 
30
    endif (WITH_SFTP)
 
31
 
 
32
    if (WITH_SERVER)
 
33
        add_executable(samplesshd samplesshd.c)
 
34
        target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
 
35
    endif (WITH_SERVER)
 
36
endif (LINUX)
 
37
 
17
38
add_executable(exec exec.c ${examples_SRCS})
18
 
add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
19
 
 
20
 
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
21
 
target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
22
 
target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
23
39
target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})
24
 
target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
25
 
 
26
 
 
27
 
include_directories(
28
 
  ${LIBSSH_PUBLIC_INCLUDE_DIRS}
29
 
  ${CMAKE_BINARY_DIR}
30
 
)
31
 
 
32
 
if (WITH_SFTP)
33
 
  add_executable(samplesftp samplesftp.c ${examples_SRCS})
34
 
  target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
35
 
endif (WITH_SFTP)
36
 
 
37
 
if (WITH_SERVER)
38
 
  add_executable(samplesshd samplesshd.c)
39
 
  target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
40
 
endif (WITH_SERVER)
41
 
 
 
40
 
 
41
add_executable(senddata senddata.c ${examples_SRCS})
 
42
target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY})
 
43
 
 
44
add_executable(libsshpp libsshpp.cpp)
 
45
target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY})
 
46
 
 
47
add_executable(libsshpp_noexcept libsshpp_noexcept.cpp)
 
48
target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY})