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.
pull/1/head
Raphael Kubo da Costa 10 years ago committed by Christian Beier
parent 2b4f616d96
commit 539b310b48
  1. 3
      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

Loading…
Cancel
Save