diff options
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rw-r--r-- | client_examples/scrap.c | 2 | ||||
| -rw-r--r-- | examples/androidvncserver.c | 11 | ||||
| -rw-r--r-- | libvncclient/sasl.h | 6 |
4 files changed, 19 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index caf1832..e6dd6b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ option(WITH_ZLIB "Search for the zlib compression library to support additional option(WITH_JPEG "Search for the libjpeg compression library to support additional encodings" ON) option(WITH_PNG "Search for the PNG compression library to support additional encodings" ON) option(WITH_SDL "Search for the Simple Direct Media Layer library to build an example SDL vnc client" ON) +option(WITH_X11 "Search for X11 to build the example SDL vnc client with clipboard support" ON) option(WITH_THREADS "Search for a threading library to build with multithreading support" ON) option(WITH_GNUTLS "Search for the GnuTLS secure communications library to support encryption" ON) option(WITH_OPENSSL "Search for the OpenSSL cryptography library to support encryption" ON) @@ -104,6 +105,11 @@ if(WITH_SDL) endif(WITH_SDL) +if(WITH_X11) + find_package(X11) +endif(WITH_X11) + + if(WITH_THREADS) find_package(Threads) endif(WITH_THREADS) @@ -503,7 +509,7 @@ foreach(e ${LIBVNCCLIENT_EXAMPLES}) add_executable(client_examples_${e} ${LIBVNCCLIEXAMPLE_DIR}/${e}.c ${LIBVNCCLIEXAMPLE_DIR}/${${e}_EXTRA_SOURCES} ) set_target_properties(client_examples_${e} PROPERTIES OUTPUT_NAME ${e}) set_target_properties(client_examples_${e} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples) - target_link_libraries(client_examples_${e} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES}) + target_link_libraries(client_examples_${e} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL_LIBRARY} ${X11_LIBRARIES} ${FFMPEG_LIBRARIES}) endforeach(e ${LIBVNCCLIENT_EXAMPLES}) diff --git a/client_examples/scrap.c b/client_examples/scrap.c index c28800c..0ee22bf 100644 --- a/client_examples/scrap.c +++ b/client_examples/scrap.c @@ -14,7 +14,7 @@ #include "rfb/rfbconfig.h" /* Determine what type of clipboard we are using */ -#if defined(__unix__) && !defined(__QNXNTO__) && defined(LIBVNCSERVER_HAVE_X11) +#if defined(__unix__) && !defined(__QNXNTO__) && defined(SDL_VIDEO_DRIVER_X11) #define X11_SCRAP #elif defined(__WIN32__) #define WIN_SCRAP diff --git a/examples/androidvncserver.c b/examples/androidvncserver.c index 237c68d..885a7ef 100644 --- a/examples/androidvncserver.c +++ b/examples/androidvncserver.c @@ -1,5 +1,10 @@ /* - * $Id$ + * This example VNC server for Android is adopted from + * http://code.google.com/p/android-vnc-server/ with some additional + * fixes applied. + * + * To build, you'll need the Android Native Development Kit from + * http://developer.android.com/sdk/ndk/. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -455,7 +460,7 @@ void print_usage(char **argv) printf("%s [-k device] [-t device] [-h]\n" "-k device: keyboard device node, default is /dev/input/event3\n" "-t device: touch device node, default is /dev/input/event1\n" - "-h : print this help\n"); + "-h : print this help\n", argv[0]); } int main(int argc, char **argv) @@ -513,6 +518,6 @@ int main(int argc, char **argv) printf("Cleaning up...\n"); cleanup_fb(); - cleanup_kdb(); + cleanup_kbd(); cleanup_touch(); } diff --git a/libvncclient/sasl.h b/libvncclient/sasl.h index 5a52149..2936364 100644 --- a/libvncclient/sasl.h +++ b/libvncclient/sasl.h @@ -1,5 +1,5 @@ -#ifndef SASL_H -#define SASL_H +#ifndef RFBSASL_H +#define RFBSASL_H /* * Copyright (C) 2017 S. Waterman. All Rights Reserved. @@ -36,4 +36,4 @@ int ReadFromSASL(rfbClient* client, char *out, unsigned int n); #endif /* LIBVNCSERVER_HAVE_SASL */ -#endif /* SASL_H */ +#endif /* RFBSASL_H */ |
