Use the system copy of zlib by default, like we do with autotools.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4313 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 145dfda..59dff7b 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -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)