diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 125 |
1 files changed, 17 insertions, 108 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 269805f..a437171 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,11 +104,11 @@ if(GNUTLS_FOUND) set(LIBVNCSERVER_WITH_CLIENT_TLS 1) option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (gnutls)" ON) set(WEBSOCKET_LIBRARIES ${RESOLV_LIB} ${GNUTLS_LIBRARIES}) - set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_gnutls ${LIBVNCSERVER_DIR}/rfbcrypto_gnutls) + set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_gnutls.c ${LIBVNCSERVER_DIR}/rfbcrypto_gnutls.c) elseif(OPENSSL_FOUND) option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (openssl)" ON) set(WEBSOCKET_LIBRARIES ${RESOLV_LIB} ${OPENSSL_LIBRARIES}) - set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_openssl ${LIBVNCSERVER_DIR}/rfbcrypto_openssl) + set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_openssl.c ${LIBVNCSERVER_DIR}/rfbcrypto_openssl.c) else() option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (no ssl)" ON) set(WEBSOCKET_LIBRARIES ${RESOLV_LIB}) @@ -167,11 +167,11 @@ TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN) # LIBVNCSERVER_ENOENT_WORKAROUND # inline -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbconfig.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbint.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/rfb/rfbconfig.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/rfb/rfbint.h) set(LIBVNCSERVER_SOURCES - ${LIBVNCSERVER_DIR}/main.c + ${LIBVNCSERVER_DIR}/main.cc ${LIBVNCSERVER_DIR}/rfbserver.c ${LIBVNCSERVER_DIR}/rfbregion.c ${LIBVNCSERVER_DIR}/auth.c @@ -269,111 +269,20 @@ if(LIBVNCSERVER_WITH_WEBSOCKETS) ) endif(LIBVNCSERVER_WITH_WEBSOCKETS) +##### tdevncclient (static) ######################## -add_library(vncclient SHARED ${LIBVNCCLIENT_SOURCES}) -add_library(vncserver SHARED ${LIBVNCSERVER_SOURCES}) -if(WIN32) - set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ws2_32) -endif(WIN32) - -target_link_libraries(vncclient - ${ADDITIONAL_LIBS} - ${ZLIB_LIBRARIES} - ${JPEG_LIBRARIES} - ${GNUTLS_LIBRARIES} -) -target_link_libraries(vncserver - ${ADDITIONAL_LIBS} - ${ZLIB_LIBRARIES} - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ${WEBSOCKET_LIBRARIES} -) - -SET_TARGET_PROPERTIES(vncclient vncserver - PROPERTIES SOVERSION "0.0.0" -) - -# tests -set(LIBVNCSERVER_TESTS - backchannel - camera - colourmaptest - example - fontsel - pnmshow - pnmshow24 - regiontest - rotate - simple - simple15 - storepasswd - vncev - ) - -if(Threads_FOUND) - set(LIBVNCSERVER_TESTS - ${LIBVNCSERVER_TESTS} - blooptest - ) -endif(Threads_FOUND) - -if(TIGHTVNC_FILETRANSFER) - set(LIBVNCSERVER_TESTS - ${LIBVNCSERVER_TESTS} - filetransfer - ) -endif(TIGHTVNC_FILETRANSFER) - -if(MACOS) - set(LIBVNCSERVER_TESTS - ${LIBVNCSERVER_TESTS} - mac - ) -endif(MACOS) - -set(LIBVNCCLIENT_TESTS - backchannel - ppmtest +tde_add_library( tdevncclient STATIC_PIC AUTOMOC + SOURCES + ${LIBVNCCLIENT_SOURCES} + LINK + ${ADDITIONAL_LIBS} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${GNUTLS_LIBRARIES} ) -if(SDL_FOUND) - include_directories(${SDL_INCLUDE_DIR}) - set(LIBVNCCLIENT_TESTS - ${LIBVNCCLIENT_TESTS} - SDLvncviewer - ) - set(SDLvncviewer_EXTRA_SOURCES scrap.c) -endif(SDL_FOUND) +##### tdevncserver (static) ######################## -if(HAVE_FFMPEG) - set(LIBVNCCLIENT_TESTS - ${LIBVNCCLIENT_TESTS} - vnc2mpg - ) -endif(HAVE_FFMPEG) - - -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples) -foreach(test ${LIBVNCSERVER_TESTS}) - add_executable(examples/${test} ${LIBVNCSRVTEST_DIR}/${test}.c) - target_link_libraries(examples/${test} vncserver ${CMAKE_THREAD_LIBS_INIT}) -endforeach(test ${LIBVNCSERVER_TESTS}) - -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples) -foreach(test ${LIBVNCCLIENT_TESTS}) - 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} ${X11_LIBRARIES} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES}) -endforeach(test ${LIBVNCCLIENT_TESTS}) - -install_targets(/lib vncserver) -install_targets(/lib vncclient) -install_files(/include/rfb FILES - rfb/keysym.h - rfb/rfb.h - rfb/rfbclient.h - rfb/rfbconfig.h - rfb/rfbint.h - rfb/rfbproto.h - rfb/rfbregion.h +tde_add_library( tdevncserver STATIC_PIC AUTOMOC + SOURCES + ${LIBVNCSERVER_SOURCES} + LINK + ${ADDITIONAL_LIBS} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${WEBSOCKET_LIBRARIES} ) |