--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,28 +13,9 @@ use_c99()
 configure_file(config.h.in ${PROJECT_SOURCE_DIR}/src/config.h)
 
 if(NOT MSVC)
-  if(NOT WIN32)
-    find_library(MATH m)
-  else()
-    set(MATH "")
-  endif()
-  include(FindZLIB)
-else()
-  set(MATH "")
-  find_program(NUGET nuget)
-  if(NUGET)
-    execute_process(COMMAND ${NUGET} install zlib)
-  endif()
-  include_directories(
-    ${PROJECT_SOURCE_DIR}/windows/third-party/zlib-1.2.11/include/)
-endif()
-
-if(NOT MSVC)
-  if(NOT WIN32)
-    find_library(MATH m)
-  else()
-    set(MATH "")
-  endif()
+    if (NOT MINGW)
+        find_library(MATH m)
+    endif()
   include(FindZLIB)
   include_directories(${ZLIB_INCLUDE_DIRS})
   set(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}")
