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.
This commit is contained in:
parent
a602f87186
commit
3296e6ad90
|
@ -22,9 +22,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <cmsys/SystemTools.hxx>
|
#include <cmsys/SystemTools.hxx>
|
||||||
#include <cmlibarchive/libarchive/archive.h>
|
#include <cm_libarchive.h>
|
||||||
#include <cmlibarchive/libarchive/archive_entry.h>
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
cmCPackArchiveGenerator::cmCPackArchiveGenerator(CompressType t,
|
cmCPackArchiveGenerator::cmCPackArchiveGenerator(CompressType t,
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
#include <cmsys/Directory.hxx>
|
#include <cmsys/Directory.hxx>
|
||||||
#include <cmsys/System.h>
|
#include <cmsys/System.h>
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include <cmlibarchive/libarchive/archive.h>
|
# include <cm_libarchive.h>
|
||||||
#include <cmlibarchive/libarchive/archive_entry.h>
|
|
||||||
# include <cmsys/Terminal.h>
|
# include <cmsys/Terminal.h>
|
||||||
#endif
|
#endif
|
||||||
#include <cmsys/stl/algorithm>
|
#include <cmsys/stl/algorithm>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#cmakedefine CMAKE_USE_SYSTEM_CURL
|
#cmakedefine CMAKE_USE_SYSTEM_CURL
|
||||||
#cmakedefine CMAKE_USE_SYSTEM_EXPAT
|
#cmakedefine CMAKE_USE_SYSTEM_EXPAT
|
||||||
#cmakedefine CMAKE_USE_SYSTEM_ZLIB
|
#cmakedefine CMAKE_USE_SYSTEM_ZLIB
|
||||||
|
#cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE
|
||||||
#cmakedefine CTEST_USE_XMLRPC
|
#cmakedefine CTEST_USE_XMLRPC
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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 <archive.h>
|
||||||
|
# include <archive_entry.h>
|
||||||
|
#else
|
||||||
|
# include <cmlibarchive/libarchive/archive.h>
|
||||||
|
# include <cmlibarchive/libarchive/archive_entry.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue