diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index a52d05eea..5981603ed 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -22,9 +22,7 @@ #include #include -#include -#include - +#include //---------------------------------------------------------------------- cmCPackArchiveGenerator::cmCPackArchiveGenerator(CompressType t, diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 0badbba4d..2364d7eb7 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -23,8 +23,7 @@ #include #include #if defined(CMAKE_BUILD_WITH_CMAKE) -#include -#include +# include # include #endif #include diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index 6cdd47cf6..daf811412 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 000000000..1469baeb4 --- /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