git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4241 3789f03b-4d11-0410-bbf8-ca57d06f2519tags/v1.0.90
@@ -85,6 +85,14 @@ if(MINGW) | |||
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff <SOURCE>") | |||
endif() | |||
# Check for GNUTLS library | |||
find_package(GnuTLS) | |||
if(GNUTLS_FOUND) | |||
include_directories(${GNUTLS_INCLUDE_DIR}) | |||
add_definitions("-DHAVE_GNUTLS") | |||
add_definitions(${GNUTLS_DEFINITIONS}) | |||
endif() | |||
# Generate config.h | |||
include(CheckIncludeFiles) | |||
include(CheckFunctionExists) |
@@ -14,4 +14,9 @@ add_library(rdr STATIC | |||
ZlibInStream.cxx | |||
ZlibOutStream.cxx) | |||
target_link_libraries(rdr zlib os) | |||
set(RDR_LIBRARIES zlib os) | |||
if(GNUTLS_FOUND) | |||
set(RDR_LIBRARIES ${RDR_LIBRARIES} ${GNUTLS_LIBRARIES}) | |||
endif() | |||
target_link_libraries(rdr ${RDR_LIBRARIES}) |
@@ -1,7 +1,7 @@ | |||
include_directories(${CMAKE_SOURCE_DIR}/common ${CMAKE_SOURCE_DIR}/win | |||
${CMAKE_SOURCE_DIR}/common/jpeg ${CMAKE_SOURCE_DIR}/common/jpeg/win) | |||
add_library(rfb STATIC | |||
set(RFB_SOURCES | |||
Blacklist.cxx | |||
CConnection.cxx | |||
CMsgHandler.cxx | |||
@@ -66,4 +66,20 @@ add_library(rfb STATIC | |||
encodings.cxx | |||
util.cxx) | |||
target_link_libraries(rfb jpeg os) | |||
set(RFB_LIBRARIES jpeg os) | |||
if(GNUTLS_FOUND) | |||
set(RFB_SOURCES | |||
${RFB_SOURCES} | |||
CSecurityTLS.cxx | |||
SSecurityTLS.cxx | |||
) | |||
set(RFB_LIBRARIES | |||
${RFB_LIBRARIES} | |||
${GNUTLS_LIBRARIES} | |||
) | |||
endif() | |||
add_library(rfb STATIC ${RFB_SOURCES}) | |||
target_link_libraries(rfb ${RFB_LIBRARIES}) |
@@ -4,3 +4,8 @@ | |||
#cmakedefine HAVE_STRCASECMP | |||
#cmakedefine HAVE_STRNCASECMP | |||
#cmakedefine HAVE_VSNPRINTF | |||
/* MS Visual Studio 2008 and newer doesn't know ssize_t */ | |||
#if defined(HAVE_GNUTLS) && defined(WIN32) | |||
#define ssize_t long | |||
#endif |