This makes the library friendly to use as a git submodule within another
project, and should change nothing when compiled alone.
For example when having a directory structure like "my_project/external/libvnc",
where in libvnc resides a checkout of libvncserver, one can just reference that
directory from the CMakeLists.txt in my_project with
> add_directory ( external/libvnc )
and add vncclient / vncserver in my_project's taret_link_libraries, one can just
hack away without having to manually make / install LibVNCServer whenever
something is changed there.
byteswap.h exists only on glibc, so building libvncserver with websockets
support was not possible in other systems.
Replace the inclusion of byteswap.h and the WS_* definitions with calls to
htobeNN, which should perform the same conversions, be more portable and
avoid the need to check for the platform's endianness.
libresolv is only present on systems which use glibc; platforms such as
FreeBSD have __b64_ntop as part of libc itself.
Improve the detection process and only link against libresolv if it exists
on the system, and remember to reset CMAKE_REQUIRED_LIBRARIES after
performing the necessary tests, since we do not always want to link against
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,
No functional changes. All files used by _both_ libvncserver and
libvncclient are put into a 'common' directory and references
from other files as well as Autotools and CMake build systems are
Signed-off-by: Christian Beier <firstname.lastname@example.org>
- It's SDL_LIBRARY, not SDL_LIBRARIES
- Detect GnuTLS and set the macro in rfbconfig.h
- Add tls.c to libvncclient to avoid missing symbols
Signed-off-by: Corentin Chary <email@example.com>
Signed-off-by: Johannes Schindelin <firstname.lastname@example.org>