Commit 56af603e authored by Christian Beier's avatar Christian Beier

CMake: fix building SDLvncviewer.

parent 9882fdf7
...@@ -18,6 +18,7 @@ find_package(JPEG) ...@@ -18,6 +18,7 @@ find_package(JPEG)
find_package(SDL) find_package(SDL)
find_package(GnuTLS) find_package(GnuTLS)
find_package(Threads) find_package(Threads)
find_package(X11)
if(SDL_FOUND) # == pthread.h available if(SDL_FOUND) # == pthread.h available
option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON) option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON)
...@@ -219,6 +220,7 @@ if(SDL_FOUND) ...@@ -219,6 +220,7 @@ if(SDL_FOUND)
${LIBVNCCLIENT_TESTS} ${LIBVNCCLIENT_TESTS}
SDLvncviewer SDLvncviewer
) )
set(SDLvncviewer_EXTRA_SOURCES scrap.c)
endif(SDL_FOUND) endif(SDL_FOUND)
if(HAVE_FFMPEG) if(HAVE_FFMPEG)
...@@ -237,8 +239,8 @@ endforeach(test ${LIBVNCSERVER_TESTS}) ...@@ -237,8 +239,8 @@ endforeach(test ${LIBVNCSERVER_TESTS})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/client_examples) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/client_examples)
foreach(test ${LIBVNCCLIENT_TESTS}) foreach(test ${LIBVNCCLIENT_TESTS})
add_executable(client_examples/${test} ${LIBVNCCLITEST_DIR}/${test}.c) add_executable(client_examples/${test} ${LIBVNCCLITEST_DIR}/${test}.c ${LIBVNCCLITEST_DIR}/${${test}_EXTRA_SOURCES} )
target_link_libraries(client_examples/${test} vncclient ${CMAKE_THREAD_LIBS_INIT} ${GNUTLS_LIBRARIES} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES}) target_link_libraries(client_examples/${test} vncclient ${CMAKE_THREAD_LIBS_INIT} ${GNUTLS_LIBRARIES} ${X11_LIBRARIES} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES})
endforeach(test ${LIBVNCCLIENT_TESTS}) endforeach(test ${LIBVNCCLIENT_TESTS})
install_targets(/lib vncserver) install_targets(/lib vncserver)
......
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