--- minizip/CMakeLists.txt.orig	2018-11-01 10:08:03.857622900 +0300
+++ minizip/CMakeLists.txt	2018-11-01 10:12:15.003464000 +0300
@@ -63,10 +63,6 @@
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -msse4.1 -maes")
 endif()
 
-# create minizip library
-add_library(minizip ${MINIZIP_SRC} ${MINIZIP_PUBLIC_HEADERS})
-target_link_libraries(minizip ZLIB::ZLIB)
-
 option(USE_AES "enables building of aes library" ON)
 if(USE_AES)
   set(AES_SRC 
@@ -93,22 +89,21 @@
     aes/pwd2key.h
     aes/sha1.h)
 
-  add_library(aes ${AES_SRC} ${AES_PUBLIC_HEADERS})
-
   add_definitions(-DHAVE_AES)
 
-  target_link_libraries(minizip aes)
-
-  install(TARGETS aes EXPORT minizip-exports
-    INCLUDES DESTINATION "include"
-    RUNTIME DESTINATION  "bin"
-    LIBRARY DESTINATION  "lib"
-    ARCHIVE DESTINATION  "lib")
-
   install(FILES ${AES_PUBLIC_HEADERS}
     DESTINATION "include/minizip/aes")
 endif()
 
+# create minizip library
+add_library(minizip ${MINIZIP_SRC} ${MINIZIP_PUBLIC_HEADERS}
+                    ${AES_SRC} ${AES_PUBLIC_HEADERS})
+set_target_properties(minizip PROPERTIES 
+                      ARCHIVE_OUTPUT_NAME "minizip"
+                      OUTPUT_NAME "minizip"
+                      RUNTIME_OUTPUT_NAME "minizip-1")
+target_link_libraries(minizip ZLIB::ZLIB)
+
 install(TARGETS minizip EXPORT minizip-exports
   INCLUDES DESTINATION "include"
   RUNTIME DESTINATION "bin"
