From 3296e6ad90865ae618435452e3422eab97ce9a09 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 5 Aug 2010 17:06:10 -0400 Subject: Include headers from chosen libarchive (#10923) When CMAKE_USE_SYSTEM_LIBARCHIVE is on we must include the system libarchive headers to match the library that will be linked. --- Utilities/cmThirdParty.h.in | 1 + Utilities/cm_libarchive.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Utilities/cm_libarchive.h (limited to 'Utilities') diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index 6cdd47cf60..daf8114128 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_LIBARCHIVE #cmakedefine CTEST_USE_XMLRPC #endif diff --git a/Utilities/cm_libarchive.h b/Utilities/cm_libarchive.h new file mode 100644 index 0000000000..1469baeb46 --- /dev/null +++ b/Utilities/cm_libarchive.h @@ -0,0 +1,25 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2010 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_libarchive_h +#define __cm_libarchive_h + +/* Use the libarchive configured for CMake. */ +#include "cmThirdParty.h" +#ifdef CMAKE_USE_SYSTEM_LIBARCHIVE +# include +# include +#else +# include +# include +#endif + +#endif -- cgit v1.2.1