From 1939a55c3cae415ae295134d54e34a2daec43438 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 23 Jul 2009 11:57:17 +0200 Subject: Fix getaddrinfo and gethostbyname build problems on Solaris. --- libssh/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libssh') diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt index 0aceca88..89288db5 100644 --- a/libssh/CMakeLists.txt +++ b/libssh/CMakeLists.txt @@ -35,6 +35,20 @@ if (WIN32) ) endif (WIN32) +if (HAVE_LIB_GETHOSTBYNAME) + set(LIBSSH_LINK_LIBRARIES + ${LIBSSH_LINK_LIBRARIES} + nsl + ) +endif (HAVE_LIB_GETHOSTBYNAME) + +if (HAVE_LIB_GETADDRINFO) + set(LIBSSH_LINK_LIBRARIES + ${LIBSSH_LINK_LIBRARIES} + socket + ) +endif (HAVE_LIB_GETADDRINFO) + if (CRYPTO_LIBRARY) set(LIBSSH_PRIVATE_INCLUDE_DIRS ${LIBSSH_PRIVATE_INCLUDE_DIRS} -- cgit