summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-03-24 01:36:05 +0100
committerChristian Beier <dontmind@freeshell.org>2018-03-24 01:36:05 +0100
commit71c3215d8f2a0760337506da1d93ac4712bdaeb9 (patch)
tree77e335577c0bd21dd0aac6a94b3c2a62bca88e97 /CMakeLists.txt
parentc49204c815687da49f0f62c462041506bc23822b (diff)
downloadlibtdevnc-71c3215d8f2a0760337506da1d93ac4712bdaeb9.tar.gz
libtdevnc-71c3215d8f2a0760337506da1d93ac4712bdaeb9.zip
SDLvncviewer: enable the X11 clipboard if X11 was found
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 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})