fops_zip: require libz
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7ad101..579faa4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -659,8 +659,12 @@
 endif()
 
 if (LWS_WITH_ZIP_FOPS)
-	list(APPEND SOURCES
-		lib/fops-zip.c)
+       if (LWS_WITH_ZLIB)
+               list(APPEND SOURCES
+                       lib/fops-zip.c)
+       else()
+               message(FATAL_ERROR "Pre-zipped file support (LWS_WITH_ZIP_FOPS) requires ZLIB (LWS_WITH_ZLIB)")
+       endif()
 endif()
 
 # Add helper files for Windows.