FindLibLZMA¶
Finds the liblzma, a data compression library that implements the LZMA (Lempel–Ziv–Markov chain algorithm):
find_package(LibLZMA [<version>] [...])
Imported Targets¶
This module provides the following Imported Targets:
LibLZMA::LibLZMA
在 3.14 版被加入.
Target encapsulating the liblzma library usage requirements, available only if liblzma is found.
結果變數¶
該模組定義了以下變數:
LibLZMA_FOUND
在 3.3 版被加入.
Boolean indicating whether (the requested version of) liblzma was found.
LibLZMA_VERSION
在 4.2 版被加入.
The version of liblzma found (available as a string, for example,
5.0.3
).LIBLZMA_INCLUDE_DIRS
Include directories containing headers needed to use liblzma.
LIBLZMA_LIBRARIES
Libraries needed to link against to use liblzma.
快取變數¶
The following cache variables may also be set:
LIBLZMA_HAS_AUTO_DECODER
Boolean sanity check result indicating whether the
lzma_auto_decoder()
function (automatic decoder functionality) is found in liblzma (required).LIBLZMA_HAS_EASY_ENCODER
Boolean sanity check result indicating whether the
lzma_easy_encoder()
function (basic encoder API) is found in liblzma (required).LIBLZMA_HAS_LZMA_PRESET
Boolean sanity check result indicating whether the
lzma_lzma_preset()
function (preset compression configuration) is found in liblzma (required).
已棄用的變數¶
The following variables are provided for backward compatibility:
LIBLZMA_FOUND
在 4.2 版之後被棄用: Use
LibLZMA_FOUND
, which has the same value.Boolean indicating whether (the requested version of) liblzma was found.
LIBLZMA_VERSION
在 3.26 版被加入.
在 4.2 版之後被棄用: Superseded by the
LibLZMA_VERSION
.The version of liblzma found.
LIBLZMA_VERSION_STRING
在 3.26 版之後被棄用: Superseded by the
LIBLZMA_VERSION
(andLibLZMA_VERSION
).The version of liblzma found.
LIBLZMA_VERSION_MAJOR
在 3.26 版之後被棄用.
The major version of liblzma found.
LIBLZMA_VERSION_MINOR
在 3.26 版之後被棄用.
The minor version of liblzma found.
LIBLZMA_VERSION_PATCH
在 3.26 版之後被棄用.
The patch version of liblzma found.
範例¶
Finding the liblzma library and linking it to a project target:
find_package(LibLZMA)
target_link_libraries(project_target PRIVATE LibLZMA::LibLZMA)