Skip to content

Commit

Permalink
Added ioapi.h shim for backwards compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Oct 19, 2023
1 parent aa4f873 commit 0d81d2e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,10 @@ endif()
if(MZ_COMPAT)
set(SOVERSION "1")

set(FILE_H "ioapi.h")
set(MZ_COMPAT_FILE "MZ_COMPAT_IOAPI")
configure_file(mz_compat_shim.h.in ioapi.h)

set(FILE_H "zip.h")
set(MZ_COMPAT_FILE "MZ_COMPAT_ZIP")
configure_file(mz_compat_shim.h.in zip.h)
Expand All @@ -626,8 +630,12 @@ if(MZ_COMPAT)
if(MZ_COMPAT_VERSION)
list(APPEND MINIZIP_DEF -DMZ_COMPAT_VERSION=${MZ_COMPAT_VERSION})
endif()

list(APPEND MINIZIP_SRC mz_compat.c)
list(APPEND MINIZIP_HDR mz_compat.h ${CMAKE_CURRENT_BINARY_DIR}/zip.h ${CMAKE_CURRENT_BINARY_DIR}/unzip.h)
list(APPEND MINIZIP_HDR mz_compat.h
${CMAKE_CURRENT_BINARY_DIR}/ioapi.h
${CMAKE_CURRENT_BINARY_DIR}/zip.h
${CMAKE_CURRENT_BINARY_DIR}/unzip.h)
endif()

# Detect available sanitizers
Expand Down

0 comments on commit 0d81d2e

Please sign in to comment.