summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2010-04-28 10:12:42 +0200
committerJohannes Schindelin <johannes.schindelin@gmx.de>2010-04-28 12:04:36 +0200
commita34d9215715813597ba7746c7a230e8ded6ae316 (patch)
tree0147f3cfed3ce8c2c21b4e4bdb2becf8fee573cb
parent8d79a63d3c8caca5d0db4827e072f7c773387afa (diff)
downloadlibvncserver-a34d9215715813597ba7746c7a230e8ded6ae316.zip
libvncserver-a34d9215715813597ba7746c7a230e8ded6ae316.tar.gz
cmake: fix CMakeLists.txt
- It's SDL_LIBRARY, not SDL_LIBRARIES - Detect GnuTLS and set the macro in rfbconfig.h - Add tls.c to libvncclient to avoid missing symbols Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r--CMakeLists.txt9
-rw-r--r--rfb/rfbconfig.h.cmake3
2 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8876c3..30dab04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 2.6)
+
project(LibVNCServer)
include(CheckFunctionExists)
include(CheckIncludeFile)
@@ -14,6 +16,7 @@ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/
find_package(ZLIB)
find_package(JPEG)
find_package(SDL)
+find_package(GnuTLS)
if(SDL_FOUND) # == pthread.h available
option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON)
@@ -25,6 +28,9 @@ if(JPEG_FOUND)
set(LIBVNCSERVER_HAVE_LIBJPEG 1)
endif(JPEG_FOUND)
option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON)
+if(GNUTLS_FOUND)
+ set(LIBVNCSERVER_WITH_CLIENT_TLS 1)
+endif(GNUTLS_FOUND)
check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H)
check_include_file("netinet/in.h" LIBVNCSERVER_HAVE_NETINET_IN_H)
@@ -107,6 +113,7 @@ set(LIBVNCCLIENT_SOURCES
${LIBVNCCLIENT_DIR}/sockets.c
${LIBVNCCLIENT_DIR}/vncviewer.c
${LIBVNCCLIENT_DIR}/minilzo.c
+ ${LIBVNCCLIENT_DIR}/tls.c
)
if(ZLIB_FOUND)
@@ -227,7 +234,7 @@ endforeach(test ${LIBVNCSERVER_TESTS})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/client_examples)
foreach(test ${LIBVNCCLIENT_TESTS})
add_executable(client_examples/${test} ${LIBVNCCLITEST_DIR}/${test}.c)
- target_link_libraries(client_examples/${test} vncclient ${SDL_LIBRARIES} ${FFMPEG_LIBRARIES})
+ target_link_libraries(client_examples/${test} vncclient ${GNUTLS_LIBRARIES} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES})
endforeach(test ${LIBVNCCLIENT_TESTS})
install_targets(/lib vncserver)
diff --git a/rfb/rfbconfig.h.cmake b/rfb/rfbconfig.h.cmake
index 5e15569..f9f9ba3 100644
--- a/rfb/rfbconfig.h.cmake
+++ b/rfb/rfbconfig.h.cmake
@@ -54,6 +54,9 @@
/* Define to the version of this package. */
#define LIBVNCSERVER_PACKAGE_VERSION "@PACKAGE_VERSION@"
+/* Define to 1 if GnuTLS is present */
+#cmakedefine LIBVNCSERVER_WITH_CLIENT_TLS 1
+
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1
OpenPOWER on IntegriCloud