Commit 539b310b authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Christian Beier

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.
parent 2b4f616d
...@@ -107,6 +107,7 @@ endif() ...@@ -107,6 +107,7 @@ endif()
if(LIBGCRYPT_LIBRARIES) if(LIBGCRYPT_LIBRARIES)
message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}") message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}")
set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1) set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1)
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${LIBGCRYPT_LIBRARIES})
endif(LIBGCRYPT_LIBRARIES) endif(LIBGCRYPT_LIBRARIES)
...@@ -259,7 +260,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS) ...@@ -259,7 +260,7 @@ endif(LIBVNCSERVER_WITH_WEBSOCKETS)
add_library(vncclient SHARED ${LIBVNCCLIENT_SOURCES}) add_library(vncclient SHARED ${LIBVNCCLIENT_SOURCES})
add_library(vncserver SHARED ${LIBVNCSERVER_SOURCES}) add_library(vncserver SHARED ${LIBVNCSERVER_SOURCES})
if(WIN32) if(WIN32)
set(ADDITIONAL_LIBS ws2_32) set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ws2_32)
endif(WIN32) endif(WIN32)
target_link_libraries(vncclient target_link_libraries(vncclient
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment