summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Library_package2.mk6
-rw-r--r--package/source/zipapi/Deflater.cxx4
-rw-r--r--package/source/zipapi/Inflater.cxx4
3 files changed, 14 insertions, 0 deletions
diff --git a/package/Library_package2.mk b/package/Library_package2.mk
index fcb7b6225932..223e280d2830 100644
--- a/package/Library_package2.mk
+++ b/package/Library_package2.mk
@@ -88,4 +88,10 @@ $(eval $(call gb_Library_add_exception_objects,package2,\
package/source/zippackage/ZipPackageStream \
))
+ifeq ($(SYSTEM_ZLIB),YES)
+$(eval $(call gb_Library_add_defs,package2,\
+ -DSYSTEM_ZLIB \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index 3333c0d8794b..75d9d39e0436 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -27,7 +27,11 @@
************************************************************************/
#include <package/Deflater.hxx>
+#ifdef SYSTEM_ZLIB
#include <zlib.h>
+#else
+#include <external/zlib/zlib.h>
+#endif
#include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <string.h> // for memset
diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx
index b83eea021e63..2149e59e5ddf 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -27,7 +27,11 @@
************************************************************************/
#include <package/Inflater.hxx>
+#ifdef SYSTEM_ZLIB
#include <zlib.h>
+#else
+#include <external/zlib/zlib.h>
+#endif
#include <string.h> // for memset
using namespace com::sun::star::uno;