From 4bcf3798391e869a009e1c3d31b82d194106783d Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 22 Aug 2011 14:19:07 +0100 Subject: [PATCH] Fix minizip library compilation under OS X Set the USE_FILE32API flag on Mac since fopen64() and several related calls do not exist on that platform which uses 64bit I/O in the standard file methods. See http://stackoverflow.com/questions/4003479/how-to-enable-large-file-support-under-darwin for details. --- external/minizip/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/external/minizip/CMakeLists.txt b/external/minizip/CMakeLists.txt index 7604bcc..22150f4 100644 --- a/external/minizip/CMakeLists.txt +++ b/external/minizip/CMakeLists.txt @@ -16,6 +16,13 @@ set (HEADERS zip.h ) +if (APPLE) + # Mac OS X does not have fopen64() + # and several related functions as the standard fopen() + # calls are 64bit + add_definitions("-DUSE_FILE32API") +endif() + add_library(minizip ${SOURCES} ${HEADERS}