Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose zlib constants for backwards compat #747 #750

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,9 @@ target_include_directories(${MINIZIP_TARGET} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
if(MZ_COMPAT)
target_include_directories(${MINIZIP_TARGET} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
${ZLIB_SOURCE_DIR}
${ZLIB_BINARY_DIR})
Comment on lines +714 to +716
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my experiments, that part isn't needed. It's actually causing extra build issues (for Windows).

I came up with a solution that builds in #815

endif()

# Install files
Expand Down
7 changes: 4 additions & 3 deletions mz_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

#include "mz.h"

#ifndef ZLIB_H
#include <zlib.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -147,9 +151,6 @@ typedef const char *zipcharpc;
#define ZIP_BADZIPFILE (-103)
#define ZIP_INTERNALERROR (-104)

#ifndef Z_DEFLATED
nmoinvaz marked this conversation as resolved.
Show resolved Hide resolved
#define Z_DEFLATED (8)
#endif
#define Z_BZIP2ED (12)

#define APPEND_STATUS_CREATE (0)
Expand Down
Loading