2010-01-21 21:54:20 +01:00
|
|
|
project(libssh-examples C CXX)
|
2009-07-25 17:03:01 +02:00
|
|
|
|
|
|
|
set(examples_SRCS
|
|
|
|
authentication.c
|
|
|
|
knownhosts.c
|
2009-09-06 12:54:57 +03:00
|
|
|
connect_ssh.c
|
2009-07-25 17:03:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
2009-10-09 21:44:05 +02:00
|
|
|
${LIBSSH_PRIVATE_INCLUDE_DIRS}
|
2009-07-25 17:03:01 +02:00
|
|
|
)
|
|
|
|
|
2009-09-06 14:26:02 +03:00
|
|
|
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
|
|
|
|
add_executable(scp_download scp_download.c ${examples_SRCS})
|
2009-11-07 03:45:27 +01:00
|
|
|
add_executable(samplessh sample.c ${examples_SRCS})
|
2009-12-22 18:33:16 +01:00
|
|
|
add_executable(exec exec.c ${examples_SRCS})
|
2010-05-17 20:03:44 +02:00
|
|
|
add_executable(senddata senddata.c ${examples_SRCS})
|
2010-07-16 23:14:47 +02:00
|
|
|
add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
|
2010-05-17 20:03:44 +02:00
|
|
|
|
2010-01-21 21:54:20 +01:00
|
|
|
add_executable(libsshpp libsshpp.cpp)
|
2010-08-27 11:52:09 +02:00
|
|
|
add_executable(libsshpp_noexcept libsshpp_noexcept.cpp)
|
2009-07-25 17:03:01 +02:00
|
|
|
|
2009-07-30 11:11:00 +02:00
|
|
|
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
|
2009-09-06 14:26:02 +03:00
|
|
|
target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
|
2009-11-06 19:21:18 +01:00
|
|
|
target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
|
2009-12-22 18:33:16 +01:00
|
|
|
target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})
|
2010-05-17 20:03:44 +02:00
|
|
|
target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY})
|
2010-01-21 21:54:20 +01:00
|
|
|
target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY})
|
2010-08-27 11:52:09 +02:00
|
|
|
target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY})
|
2010-07-16 23:14:47 +02:00
|
|
|
target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
|
|
|
|
|
2009-09-06 14:26:02 +03:00
|
|
|
|
2009-10-09 21:44:05 +02:00
|
|
|
include_directories(
|
|
|
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
2009-10-09 22:04:56 +02:00
|
|
|
${CMAKE_BINARY_DIR}
|
2009-10-09 21:44:05 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if (WITH_SFTP)
|
2009-11-06 19:21:18 +01:00
|
|
|
add_executable(samplesftp samplesftp.c ${examples_SRCS})
|
|
|
|
target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
|
2009-10-09 21:44:05 +02:00
|
|
|
endif (WITH_SFTP)
|
|
|
|
|
|
|
|
if (WITH_SERVER)
|
|
|
|
add_executable(samplesshd samplesshd.c)
|
|
|
|
target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
|
|
|
|
endif (WITH_SERVER)
|
|
|
|
|