Use system zlib if available
[quassel.git] / src / common / CMakeLists.txt
index 70c0a55..87a08d2 100644 (file)
@@ -43,8 +43,6 @@ set(SOURCES
 
     protocols/datastream/datastreampeer.cpp
     protocols/legacy/legacypeer.cpp
-
-    ../../3rdparty/miniz/miniz.c
 )
 
 set(MOC_HDRS
@@ -99,6 +97,10 @@ if (HAVE_QCA2)
     set(HEADERS ${HEADERS} keyevent.h)
 endif(HAVE_QCA2)
 
+if(NOT HAVE_ZLIB)
+    set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
+endif(NOT HAVE_ZLIB)
+
 if(APPLE)
   set(SOURCES ${SOURCES} mac_utils.cpp)
   set(HEADERS ${HEADERS} mac_utils.h)