diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80609eed991f887cfc69af89b2890b57c732c204..90a6d40206e5581b1215cfcda80396711690d90f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,7 @@ opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT}
 opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT})
 opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF)
 opt(GMM "Enable GMM linear solvers (simple alternative to PETSc)" ${DEFAULT})
+opt(GMP "Enable GMP for Kbipack (advanced)" ON)
 opt(GRAPHICS "Enable building graphics lib even without GUI (advanced)" OFF)
 opt(KBIPACK "Enable Kbipack (neeeded by homology solver)" ${DEFAULT})
 opt(MATHEX "Enable math expression parser (used by plugins and options)" ${DEFAULT})
@@ -93,6 +94,7 @@ opt(TETGEN_OLD "Enable older version of Tetgen" OFF)
 opt(VORO3D "Enable Voro3D (for hex meshing, experimental)" ${DEFAULT})
 opt(WRAP_JAVA "Enable generation of Java wrappers (experimental)" OFF)
 opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF)
+opt(ZIPPER "Enable zip compression/decompression" OFF)
 
 set(GMSH_MAJOR_VERSION 2)
 set(GMSH_MINOR_VERSION 10)
@@ -700,8 +702,10 @@ if(ENABLE_KBIPACK)
   set_config_option(HAVE_KBIPACK "Kbipack")
   add_subdirectory(contrib/kbipack)
   include_directories(contrib/kbipack)
-  find_library(GMP_LIB gmp)
-  find_path(GMP_INC "gmp.h" PATH_SUFFIXES src include)
+  if(ENABLE_GMP)
+    find_library(GMP_LIB gmp)
+    find_path(GMP_INC "gmp.h" PATH_SUFFIXES src include)
+  endif(ENABLE_GMP)
   if(GMP_LIB AND GMP_INC)
     set_config_option(HAVE_GMP "GMP")
     list(APPEND EXTERNAL_LIBRARIES ${GMP_LIB})
@@ -1159,9 +1163,25 @@ if(ENABLE_ACIS)
   endif(ACIS_LIB)
 endif(ENABLE_ACIS)
 
-if(HAVE_ZLIB AND ENABLE_COMPRESSED_IO)
+if(HAVE_LIBZ AND ENABLE_COMPRESSED_IO)
   set_config_option(HAVE_COMPRESSED_IO "CompressedIO")
-endif(HAVE_ZLIB AND ENABLE_COMPRESSED_IO)
+endif(HAVE_LIBZ AND ENABLE_COMPRESSED_IO)
+
+if(ENABLE_ZIPPER)
+  if(NOT HAVE_LIBZ) # necessary for non-GUI builds
+    find_package(ZLIB)
+    if(ZLIB_FOUND)
+      set_config_option(HAVE_LIBZ "Zlib")
+      list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES})
+      list(APPEND EXTERNAL_INCLUDES ${ZLIB_INCLUDE_DIR})
+    endif(ZLIB_FOUND)
+  endif(NOT HAVE_LIBZ)
+  if(HAVE_LIBZ)
+    add_subdirectory(contrib/zipper)
+    include_directories(contrib/zipper)
+    set_config_option(HAVE_ZIPPER "Zipper")
+  endif(HAVE_LIBZ)
+endif(ENABLE_ZIPPER)
 
 if(ENABLE_WRAP_PYTHON)
   find_package(SWIG)