From 95763a63e80ce31563a60fd6e0c65d6d8d688acd Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 13 Feb 2015 11:12:42 +0100 Subject: GnuTLS needs socket libraries so include them in the static link --- cmake/StaticBuild.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 49706bd3..0b990357 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -47,14 +47,18 @@ if(BUILD_STATIC) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -Wl,-Bdynamic") - # GnuTLS uses various crypto-api stuff if (WIN32) + # GnuTLS uses various crypto-api stuff set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lcrypt32") + # And sockets + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lws2_32") endif() - # nanosleep() lives here on Solaris if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + # nanosleep() lives here on Solaris set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lrt") + # and socket functions are hidden here + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lsocket") endif() # GnuTLS uses gettext and zlib, so make sure those are always -- cgit v1.2.3