Revision: 4468
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4468&view=rev
Author: dcommander
Date: 2011-06-07 04:07:20 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Fix detection of GnuTLS and its features when linking statically with an
installation of GnuTLS installed in an arbitrary directory
Modified Paths:
--------------
trunk/CMakeLists.txt
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2011-06-07 01:55:12 UTC (rev 4467)
+++ trunk/CMakeLists.txt 2011-06-07 04:07:20 UTC (rev 4468)
@@ -224,14 +224,22 @@
add_definitions(${GNUTLS_DEFINITIONS})
# Detect old version of GnuTLS
+ set(CMAKE_REQUIRED_FLAGS -I${GNUTLS_INCLUDE_DIR})
set(CMAKE_EXTRA_INCLUDE_FILES gnutls/gnutls.h)
- set(CMAKE_REQUIRED_LIBRARIES gnutls)
+ set(CMAKE_REQUIRED_LIBRARIES ${GNUTLS_LIBRARIES})
+ if(ZLIB_FOUND)
+ # When we build against the static version of GnuTLS, we also use the
+ # included version of Zlib, but it isn't built yet, so we have to use the
+ # system's version (if available) to perform this test.
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};-lz)
+ endif()
check_function_exists(gnutls_transport_set_global_errno HAVE_OLD_GNUTLS)
check_function_exists(gnutls_x509_crt_print HAVE_GNUTLS_X509_CRT_PRINT)
check_type_size(gnutls_x509_crt_t GNUTLS_X509_CRT_T)
check_type_size(gnutls_datum_t GNUTLS_DATUM_T)
check_type_size(gnutls_pk_algorithm_t GNUTLS_PK_ALGORITHM_T)
check_type_size(gnutls_sign_algorithm_t GNUTLS_SIGN_ALGORITHM_T)
+ set(CMAKE_REQUIRED_FLAGS)
set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits