blob: e809e5aa6a755c46688c061bb8346acf7f07d71c [file] [log] [blame] [edit]
--- minizip/CMakeLists.txt.orig 2018-11-01 09:39:57.256660300 +0300
+++ minizip/CMakeLists.txt 2018-11-01 09:48:31.840164200 +0300
@@ -15,9 +15,15 @@
project("minizip")
+# Minizip library version
+set(VERSION "1.2")
+
# set cmake debug postfix to d
set(CMAKE_DEBUG_POSTFIX "d")
+set(MINIZIP_PC ${CMAKE_CURRENT_BINARY_DIR}/minizip.pc)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/minizip.pc.cmakein ${MINIZIP_PC} @ONLY)
+
# Ensure correct version of zlib is referenced
set(ZLIB_ROOT ${DEF_ZLIB_ROOT} CACHE PATH "Parent directory of zlib installation")
find_package(ZLIB REQUIRED)
@@ -116,6 +122,8 @@
install(FILES ${MINIZIP_PUBLIC_HEADERS}
DESTINATION "include/minizip")
+install(FILES ${MINIZIP_PC} DESTINATION "lib/pkgconfig")
+
option (BUILD_TEST "enabled building of executables minizip and miniunz. Requires ZLIB!" OFF)
if(BUILD_TEST)
add_executable(miniunz_exec miniunz.c minishared.c)
--- minizip/minizip.pc.cmakein.orig 1970-01-01 03:00:00.000000000 +0300
+++ minizip/minizip.pc.cmakein 2018-11-01 09:44:56.762586400 +0300
@@ -0,0 +1,13 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: minizip
+Description: Minizip zip file manipulation library
+Version: @VERSION@
+
+Requires: zlib
+Libs: -L${libdir} -lminizip
+Libs.private: -lz
+Cflags: -I${includedir}/minizip