FindLibArchive¶
Finds the libarchive library and include directories. Libarchive is a multi-format archive and compression library.
Import Targets¶
This module defines the following Imported Targets:
LibArchive::LibArchiveAdded in version 3.17.
A target for linking against libarchive.
Result Variables¶
This module defines the following variables:
LibArchive_FOUNDBoolean indicating whether libarchive was found.
LibArchive_INCLUDE_DIRSInclude search path for using libarchive.
LibArchive_LIBRARIESLibraries to link against libarchive.
LibArchive_VERSIONA 3-component version string (
major.minor.patch) of libarchive found.Added in version 3.6: Support for a new libarchive version string format. Starting from libarchive version 3.2, a different preprocessor macro is used in the header to define the version. In CMake 3.5 and earlier, this variable will be set only for libarchive versions 3.1 and earlier. In CMake 3.6 and newer, this variable will be set for all libarchive versions.
Examples¶
Finding LibArchive and linking it to a project target:
find_package(LibArchive)
target_link_libraries(project_target PRIVATE LibArchive::LibArchive)