aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-05-03 12:12:23 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-05-03 12:12:23 +0200
commitd4e3401c2316431f91f99ffb134bfaea3d6cbbfe (patch)
treec434b034d4a211e241b41d4d4369b1a87542eb57 /examples
parent2bd6501552a2e3b9ee8fa1cafea617b4c9369864 (diff)
downloadlibssh-d4e3401c2316431f91f99ffb134bfaea3d6cbbfe.tar.gz
libssh-d4e3401c2316431f91f99ffb134bfaea3d6cbbfe.tar.xz
libssh-d4e3401c2316431f91f99ffb134bfaea3d6cbbfe.zip
examples: Fix building on FreeBSD
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index fb312f8c..a4a19524 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -8,10 +8,13 @@ set(examples_SRCS
include_directories(
${LIBSSH_PUBLIC_INCLUDE_DIRS}
- ${ARGP_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
)
+if (ARGP_INCLUDE_DIR)
+ include_directories(${ARGP_INCLUDE_DIR})
+endif()
+
if (UNIX AND NOT WIN32)
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
@@ -30,7 +33,7 @@ if (UNIX AND NOT WIN32)
add_executable(samplessh sample.c ${examples_SRCS})
target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
- if (WITH_SERVER)
+ if (WITH_SERVER AND ARGP_LIBRARY)
if (HAVE_LIBUTIL)
add_executable(ssh_server_fork ssh_server_fork.c)
target_link_libraries(ssh_server_fork ${LIBSSH_SHARED_LIBRARY} ${ARGP_LIBRARY} util)