Revision: 4313
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4313&view=rev
Author: ossman_
Date: 2011-03-03 09:44:49 +0000 (Thu, 03 Mar 2011)
Log Message:
-----------
Use the system copy of zlib by default, like we do with autotools.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/common/CMakeLists.txt
trunk/common/rdr/CMakeLists.txt
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2011-03-03 09:25:56 UTC (rev 4312)
+++ trunk/CMakeLists.txt 2011-03-03 09:44:49 UTC (rev 4313)
@@ -85,6 +85,14 @@
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff
<SOURCE>")
endif()
+# Check for zlib
+find_package(ZLIB)
+option(USE_INCLUDED_ZLIB "Force use of the bundled zlib")
+if(NOT ZLIB_FOUND)
+ message(STATUS "System zlib not found. Using included zlib")
+ set(USE_INCLUDED_ZLIB 1)
+endif()
+
# Check for GNUTLS library
find_package(GnuTLS)
if(GNUTLS_FOUND)
Modified: trunk/common/CMakeLists.txt
===================================================================
--- trunk/common/CMakeLists.txt 2011-03-03 09:25:56 UTC (rev 4312)
+++ trunk/common/CMakeLists.txt 2011-03-03 09:44:49 UTC (rev 4313)
@@ -1,5 +1,11 @@
+if(USE_INCLUDED_ZLIB)
+ add_subdirectory(zlib)
+
+ set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/common/zlib)
+ set(ZLIB_LIBRARIES zlib)
+endif()
+
add_subdirectory(os)
-add_subdirectory(zlib)
add_subdirectory(rdr)
add_subdirectory(network)
add_subdirectory(Xregion)
Modified: trunk/common/rdr/CMakeLists.txt
===================================================================
--- trunk/common/rdr/CMakeLists.txt 2011-03-03 09:25:56 UTC (rev 4312)
+++ trunk/common/rdr/CMakeLists.txt 2011-03-03 09:44:49 UTC (rev 4313)
@@ -1,4 +1,4 @@
-include_directories(${CMAKE_SOURCE_DIR}/common ${CMAKE_SOURCE_DIR}/common/zlib)
+include_directories(${CMAKE_SOURCE_DIR}/common ${ZLIB_INCLUDE_DIRS})
add_library(rdr STATIC
Exception.cxx
@@ -14,7 +14,7 @@
ZlibInStream.cxx
ZlibOutStream.cxx)
-set(RDR_LIBRARIES zlib os)
+set(RDR_LIBRARIES ${ZLIB_LIBRARIES} os)
if(GNUTLS_FOUND)
set(RDR_LIBRARIES ${RDR_LIBRARIES} ${GNUTLS_LIBRARIES} ws2_32)
endif()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits