Skip to content

Commit

Permalink
Fix pkgconfig file for private dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored and nmoinvaz committed Sep 12, 2023
1 parent 2160689 commit 7cb316f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ set(MINIZIP_HDR
mz_zip_rw.h)

set(PC_PRIVATE_LIBS)
set(PC_PRIVATE_DEPS)

# Check for system includes
check_include_file(stdint.h HAVE_STDINT_H)
Expand Down Expand Up @@ -184,7 +185,7 @@ if(MZ_ZLIB)
list(APPEND MINIZIP_LIB ${ZLIBNG_LIBRARIES})
list(APPEND MINIZIP_LBD ${ZLIBNG_LIBRARY_DIRS})

set(PC_PRIVATE_LIBS " -lz-ng")
set(PC_PRIVATE_DEPS "zlib-ng")
set(ZLIB_COMPAT OFF)
elseif(ZLIB_FOUND AND NOT MZ_FORCE_FETCH_LIBS)
message(STATUS "Using ZLIB ${ZLIB_VERSION}")
Expand All @@ -193,7 +194,7 @@ if(MZ_ZLIB)
list(APPEND MINIZIP_LIB ${ZLIB_LIBRARIES})
list(APPEND MINIZIP_LBD ${ZLIB_LIBRARY_DIRS})

set(PC_PRIVATE_LIBS " -lz")
set(PC_PRIVATE_DEPS "zlib")
set(ZLIB_COMPAT ON)
elseif(MZ_FETCH_LIBS)
clone_repo(zlib https://github.com/madler/zlib)
Expand Down
2 changes: 1 addition & 1 deletion minizip.pc.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name: @MINIZIP_TARGET@
Description: Zip manipulation library
Version: @VERSION@

Requires: zlib
Requires.private: @PC_PRIVATE_DEPS@
Libs: -L${libdir} -L${sharedlibdir} -l@MINIZIP_TARGET@
Libs.private:@PC_PRIVATE_LIBS@
Cflags: -I${includedir}

0 comments on commit 7cb316f

Please sign in to comment.