2009-07-30 11:11:00 +02:00
|
|
|
project(libssh-examples C)
|
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-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-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)
|
|
|
|
add_executable(samplessh sample.c)
|
|
|
|
target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
|
|
|
|
endif (WITH_SFTP)
|
|
|
|
|
|
|
|
if (WITH_SERVER)
|
|
|
|
add_executable(samplesshd samplesshd.c)
|
|
|
|
target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
|
|
|
|
endif (WITH_SERVER)
|
|
|
|
|