Commit 9e090406 authored by Gernot Tenchio's avatar Gernot Tenchio

cmake: adapted to latest websocket crypto changes

parent 78bd41ad
...@@ -11,6 +11,12 @@ set(FULL_PACKAGE_NAME "LibVNCServer") ...@@ -11,6 +11,12 @@ set(FULL_PACKAGE_NAME "LibVNCServer")
set(PACKAGE_VERSION "0.9.8") set(PACKAGE_VERSION "0.9.8")
set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver") set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver")
set(CMAKE_C_FLAGS "-O2 -W -Wall -g") set(CMAKE_C_FLAGS "-O2 -W -Wall -g")
set(LIBVNCSERVER_DIR ${CMAKE_SOURCE_DIR}/libvncserver)
set(COMMON_DIR ${CMAKE_SOURCE_DIR}/common)
set(LIBVNCCLIENT_DIR ${CMAKE_SOURCE_DIR}/libvncclient)
set(LIBVNCSRVTEST_DIR ${CMAKE_SOURCE_DIR}/examples)
set(LIBVNCCLITEST_DIR ${CMAKE_SOURCE_DIR}/client_examples)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/libvncserver ${CMAKE_SOURCE_DIR}/common) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/libvncserver ${CMAKE_SOURCE_DIR}/common)
...@@ -47,11 +53,15 @@ if(GNUTLS_FOUND) ...@@ -47,11 +53,15 @@ if(GNUTLS_FOUND)
set(LIBVNCSERVER_WITH_CLIENT_TLS 1) set(LIBVNCSERVER_WITH_CLIENT_TLS 1)
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (gnutls)" ON) option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (gnutls)" ON)
set(WEBSOCKET_LIBRARIES -lresolv ${GNUTLS_LIBRARIES}) set(WEBSOCKET_LIBRARIES -lresolv ${GNUTLS_LIBRARIES})
set(WSSRCS rfbssl_gnutls) set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_gnutls ${LIBVNCSERVER_DIR}/rfbcrypto_gnutls)
elseif(OPENSSL_FOUND) elseif(OPENSSL_FOUND)
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (openssl)" ON) option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (openssl)" ON)
set(WEBSOCKET_LIBRARIES -lresolv ${OPENSSL_LIBRARIES}) set(WEBSOCKET_LIBRARIES -lresolv ${OPENSSL_LIBRARIES})
set(WSSRCS rfbssl_openssl) set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_openssl ${LIBVNCSERVER_DIR}/rfbcrypto_openssl)
else()
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (no ssl)" ON)
set(WEBSOCKET_LIBRARIES -lresolv)
set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_none.c ${LIBVNCSERVER_DIR}/rfbcrypto_included.c ${COMMON_DIR}/md5.c ${COMMON_DIR}/sha1.c)
endif() endif()
if(LIBGCRYPT_LIBRARIES) if(LIBGCRYPT_LIBRARIES)
...@@ -106,12 +116,6 @@ TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN) ...@@ -106,12 +116,6 @@ TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN)
configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbconfig.h) configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbconfig.h)
configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbint.h) configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbint.h)
set(LIBVNCSERVER_DIR ${CMAKE_SOURCE_DIR}/libvncserver)
set(COMMON_DIR ${CMAKE_SOURCE_DIR}/common)
set(LIBVNCCLIENT_DIR ${CMAKE_SOURCE_DIR}/libvncclient)
set(LIBVNCSRVTEST_DIR ${CMAKE_SOURCE_DIR}/examples)
set(LIBVNCCLITEST_DIR ${CMAKE_SOURCE_DIR}/client_examples)
set(LIBVNCSERVER_SOURCES set(LIBVNCSERVER_SOURCES
${LIBVNCSERVER_DIR}/main.c ${LIBVNCSERVER_DIR}/main.c
${LIBVNCSERVER_DIR}/rfbserver.c ${LIBVNCSERVER_DIR}/rfbserver.c
...@@ -191,9 +195,7 @@ if(LIBVNCSERVER_WITH_WEBSOCKETS) ...@@ -191,9 +195,7 @@ if(LIBVNCSERVER_WITH_WEBSOCKETS)
set(LIBVNCSERVER_SOURCES set(LIBVNCSERVER_SOURCES
${LIBVNCSERVER_SOURCES} ${LIBVNCSERVER_SOURCES}
${LIBVNCSERVER_DIR}/websockets.c ${LIBVNCSERVER_DIR}/websockets.c
${LIBVNCSERVER_DIR}/${WSSRCS} ${WSSRCS}
${COMMON_DIR}/md5.c
${COMMON_DIR}/sha1.c
) )
endif(LIBVNCSERVER_WITH_WEBSOCKETS) endif(LIBVNCSERVER_WITH_WEBSOCKETS)
......
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