From 3204cf2736d8bcd864f08c3dd2f94bdcb5fe1dc8 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Fri, 16 Jul 2010 17:49:04 +0000 Subject: [PATCH] Add conditional define to allow users to compile against their own zlib's. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@784 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/BlenderLoader.cpp | 6 +++++- code/Q3BSPFileImporter.cpp | 9 ++++++++- code/XFileParser.cpp | 6 +++++- contrib/unzip/unzip.c | 1 - contrib/unzip/unzip.h | 6 +++++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index a89ad2e0e..68e487a77 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -57,7 +57,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // zlib is needed for compressed blend files #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND -# include "../contrib/zlib/zlib.h" +# ifdef ASSIMP_BUILD_NO_OWN_ZLIB +# include +# else +# include "../contrib/zlib/zlib.h" +# endif #endif using namespace Assimp; diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 25b33866a..3ed025bbb 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -45,7 +45,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Q3BSPZipArchive.h" #include "Q3BSPFileParser.h" #include "Q3BSPFileData.h" -#include "../contrib/zlib/zlib.h" + +# ifdef ASSIMP_BUILD_NO_OWN_ZLIB +# include +# else +# include "../contrib/zlib/zlib.h" +# endif + + #include "../include/aiTypes.h" #include "../include/aiMesh.h" #include diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index 598d58c84..f805bfb9a 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -53,7 +53,11 @@ using namespace Assimp::XFile; #ifndef ASSIMP_BUILD_NO_COMPRESSED_X -#include "../contrib/zlib/zlib.h" +# ifdef ASSIMP_BUILD_NO_OWN_ZLIB +# include +# else +# include "../contrib/zlib/zlib.h" +# endif // Magic identifier for MSZIP compressed data #define MSZIP_MAGIC 0x4B43 diff --git a/contrib/unzip/unzip.c b/contrib/unzip/unzip.c index 9c1de078a..f62b45ec8 100644 --- a/contrib/unzip/unzip.c +++ b/contrib/unzip/unzip.c @@ -38,7 +38,6 @@ woven in by Terry Thorsen 1/2003. #include #include #include -#include "../../contrib/zlib/zlib.h" #include "./unzip.h" #ifdef STDC diff --git a/contrib/unzip/unzip.h b/contrib/unzip/unzip.h index 31003b1f0..16fd9fd70 100644 --- a/contrib/unzip/unzip.h +++ b/contrib/unzip/unzip.h @@ -50,7 +50,11 @@ extern "C" { #endif #ifndef _ZLIB_H -#include "../../contrib/zlib/zlib.h" +# ifdef ASSIMP_BUILD_NO_OWN_ZLIB +# include +# else +# include "../zlib/zlib.h" +# endif #endif #ifndef _ZLIBIOAPI_H