diff options
author | Brad King <brad.king@kitware.com> | 2012-01-13 19:05:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-01-13 19:05:36 (GMT) |
commit | d4a9e334d3d65b2d65097e7c202db52b4a9c0509 (patch) | |
tree | c412c8c5edc0a3f90c59edfcb6261bb4041a879d /Utilities/cm_bzlib.h | |
parent | 0020fc45171c2d8b954492ea76c3b3940ebf53f3 (diff) | |
download | CMake-d4a9e334d3d65b2d65097e7c202db52b4a9c0509.zip CMake-d4a9e334d3d65b2d65097e7c202db52b4a9c0509.tar.gz CMake-d4a9e334d3d65b2d65097e7c202db52b4a9c0509.tar.bz2 |
Include bzlib.h consistently across CMake build (#10950)
Use the approach originally used in commit f91b3c1d (Add options to
build with system utility libraries, 2006-10-19) for all other
third-party libraries. Create a "cm_bzlib.h" header wrapper that
robustly includes the header from the bzip2 library chosen for the CMake
build (either builtin or system version). Include the header wrapper
anywhere we need the API provided by <bzlib.h>.
Diffstat (limited to 'Utilities/cm_bzlib.h')
-rw-r--r-- | Utilities/cm_bzlib.h | 23 |
1 files changed, 23 insertions, 0 deletions
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 |