diff options
8 files changed, 30 insertions, 6 deletions
diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index daf8114..c824085 100644 --- a/Utilities/cmThirdParty.h.in +++ b/Utilities/cmThirdParty.h.in @@ -16,6 +16,7 @@ #cmakedefine CMAKE_USE_SYSTEM_CURL #cmakedefine CMAKE_USE_SYSTEM_EXPAT #cmakedefine CMAKE_USE_SYSTEM_ZLIB +#cmakedefine CMAKE_USE_SYSTEM_BZIP2 #cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE #cmakedefine CTEST_USE_XMLRPC diff --git a/Utilities/cm_bzlib.h b/Utilities/cm_bzlib.h new file mode 100644 index 0000000..d1fffa1 --- /dev/null +++ b/Utilities/cm_bzlib.h @@ -0,0 +1,23 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2012 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef __cm_bzlib_h +#define __cm_bzlib_h + +/* Use the bzip2 library configured for CMake. */ +#include "cmThirdParty.h" +#ifdef CMAKE_USE_SYSTEM_BZIP2 +# include <bzlib.h> +#else +# include <cmbzip2/bzlib.h> +#endif + +#endif diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_filter_bzip2.c b/Utilities/cmlibarchive/libarchive/archive_read_support_filter_bzip2.c index 8d5bd1c..af618b0 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_filter_bzip2.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_filter_bzip2.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #endif #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #include "archive.h" diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c index 1580c92..2be2267 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> #endif #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #ifdef HAVE_LZMA_H #include <lzma.h> diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_xar.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_xar.c index 00f283d..0834e6f 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_xar.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_xar.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include <expat.h> #endif #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #if HAVE_LZMA_H #include <lzma.h> diff --git a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_bzip2.c b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_bzip2.c index e0d07a9..096a6a4 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_bzip2.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_bzip2.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_bzip2.c 20 #include <string.h> #endif #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #include "archive.h" diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_7zip.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_7zip.c index ce3298b..5bb248c 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_7zip.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_7zip.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #endif #include <stdlib.h> #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #if HAVE_LZMA_H #include <lzma.h> diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_xar.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_xar.c index 0f003a8..96b7b2f 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_xar.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_xar.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <libxml/xmlwriter.h> #endif #ifdef HAVE_BZLIB_H -#include <bzlib.h> +#include <cm_bzlib.h> #endif #if HAVE_LZMA_H #include <lzma.h> |