From 539b310b48e2f9b685a5418f01ecf6257ef6452e Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Tue, 11 Sep 2012 22:50:09 +0300 Subject: [PATCH] CMake: Link against libgcrypt when it is found. So far, libgcrypt was looked for but no targets linked against it directly; this caused linking problems for the client and server examples, as the symbols they needed were not passed to the linker. The issue that the GnuTLS websockets code uses libgcrypt regardless of whether it has been found or not has not been touched by this commit, though. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aaa6029..4648eec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ endif() if(LIBGCRYPT_LIBRARIES) message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}") set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1) + set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${LIBGCRYPT_LIBRARIES}) endif(LIBGCRYPT_LIBRARIES) @@ -259,7 +260,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS) add_library(vncclient SHARED ${LIBVNCCLIENT_SOURCES}) add_library(vncserver SHARED ${LIBVNCSERVER_SOURCES}) if(WIN32) - set(ADDITIONAL_LIBS ws2_32) + set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ws2_32) endif(WIN32) target_link_libraries(vncclient