aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-02-11 21:44:25 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:08:44 +0200
commit4497cd9b43c5ccc4cfc4d2af7dde0f86f1fdd6e7 (patch)
tree87b324493966be6b6f68c4b8d407adbd482b536a /examples
parent2b54db76034dfd4b546e1d7cf800183d51427ca8 (diff)
downloadlibssh-4497cd9b43c5ccc4cfc4d2af7dde0f86f1fdd6e7.tar.gz
libssh-4497cd9b43c5ccc4cfc4d2af7dde0f86f1fdd6e7.tar.xz
libssh-4497cd9b43c5ccc4cfc4d2af7dde0f86f1fdd6e7.zip
Make examples more BSD friendly
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt26
1 files changed, 15 insertions, 11 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c2f58cb9..118eecb3 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -28,25 +28,29 @@ if (LINUX)
add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
+ if (WITH_SERVER)
+ if (HAVE_LIBUTIL)
+ add_executable(samplesshd-tty samplesshd-tty.c)
+ target_link_libraries(samplesshd-tty ${LIBSSH_SHARED_LIBRARY} util)
+ endif (HAVE_LIBUTIL)
+ endif (WITH_SERVER)
+
if (WITH_SFTP)
add_executable(samplesftp samplesftp.c ${examples_SRCS})
target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
endif (WITH_SFTP)
- if (WITH_SERVER)
- add_executable(samplesshd samplesshd.c)
- target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
+endif (LINUX)
- add_executable(samplesshd-kbdint samplesshd-kbdint.c)
- target_link_libraries(samplesshd-kbdint ${LIBSSH_SHARED_LIBRARY})
+if (WITH_SERVER)
+ add_executable(samplesshd samplesshd.c)
+ target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY} ${ARGP_LIBRARIES})
- if (HAVE_LIBUTIL)
- add_executable(samplesshd-tty samplesshd-tty.c)
- target_link_libraries(samplesshd-tty ${LIBSSH_SHARED_LIBRARY} util)
- endif (HAVE_LIBUTIL)
- endif (WITH_SERVER)
-endif (LINUX)
+ add_executable(samplesshd-kbdint samplesshd-kbdint.c)
+ target_link_libraries(samplesshd-kbdint ${LIBSSH_SHARED_LIBRARY} ${ARGP_LIBRARIES})
+
+endif (WITH_SERVER)
add_executable(exec exec.c ${examples_SRCS})
target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})