summaryrefslogtreecommitdiffstats
path: root/cmake/StaticBuild.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/StaticBuild.cmake')
-rw-r--r--cmake/StaticBuild.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake
index 67f01b2f..46204b55 100644
--- a/cmake/StaticBuild.cmake
+++ b/cmake/StaticBuild.cmake
@@ -34,7 +34,7 @@ if(BUILD_STATIC)
set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls -ltasn1")
if(NETTLE_LIBRARY)
- set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lnettle -lhogweed -lgmp -lcrypt32")
+ set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lnettle -lhogweed -lgmp")
endif()
if(GCRYPT_LIBRARY)
set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lgcrypt -lgpg-error")
@@ -42,6 +42,11 @@ if(BUILD_STATIC)
set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -Wl,-Bdynamic")
+ # GnuTLS uses various crypto-api stuff
+ if (WIN32)
+ set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lcrypt32")
+ endif()
+
# nanosleep() lives here on Solaris
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lrt")