Revision: 4241
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4241&view=rev
Author: atkac
Date: 2011-01-19 14:20:34 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
[Development] Add possibility to build Windows programs with GNUTLS via cmake.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/common/rdr/CMakeLists.txt
trunk/common/rfb/CMakeLists.txt
trunk/config.h.cmake.in
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2011-01-19 14:15:14 UTC (rev 4240)
+++ trunk/CMakeLists.txt 2011-01-19 14:20:34 UTC (rev 4241)
@@ -85,6 +85,14 @@
"<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)
Modified: trunk/common/rdr/CMakeLists.txt
===================================================================
--- trunk/common/rdr/CMakeLists.txt 2011-01-19 14:15:14 UTC (rev 4240)
+++ trunk/common/rdr/CMakeLists.txt 2011-01-19 14:20:34 UTC (rev 4241)
@@ -14,4 +14,9 @@
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})
Modified: trunk/common/rfb/CMakeLists.txt
===================================================================
--- trunk/common/rfb/CMakeLists.txt 2011-01-19 14:15:14 UTC (rev 4240)
+++ trunk/common/rfb/CMakeLists.txt 2011-01-19 14:20:34 UTC (rev 4241)
@@ -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 @@
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})
Modified: trunk/config.h.cmake.in
===================================================================
--- trunk/config.h.cmake.in 2011-01-19 14:15:14 UTC (rev 4240)
+++ trunk/config.h.cmake.in 2011-01-19 14:20:34 UTC (rev 4241)
@@ -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
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits