diff options
Diffstat (limited to 'Modules/FindLibLZMA.cmake')
-rw-r--r-- | Modules/FindLibLZMA.cmake | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/Modules/FindLibLZMA.cmake b/Modules/FindLibLZMA.cmake index 837e63324..8009bcfab 100644 --- a/Modules/FindLibLZMA.cmake +++ b/Modules/FindLibLZMA.cmake @@ -1,33 +1,26 @@ -# - Find LibLZMA -# Find LibLZMA headers and library -# -# LIBLZMA_FOUND - True if liblzma is found. -# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located. -# LIBLZMA_LIBRARIES - Lzma libraries to link against. -# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required). -# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required). -# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required). -# LIBLZMA_VERSION_MAJOR - The major version of lzma -# LIBLZMA_VERSION_MINOR - The minor version of lzma -# LIBLZMA_VERSION_PATCH - The patch version of lzma -# LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3") +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. -#============================================================================= -# Copyright 2008 Per Øyvind Karlsen <peroyvind@mandriva.org> -# Copyright 2009 Alexander Neundorf <neundorf@kde.org> -# Copyright 2009 Helio Chissini de Castro <helio@kde.org> -# Copyright 2012 Mario Bensi <mbensi@ipsquad.net> +#.rst: +# FindLibLZMA +# ----------- # -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. +# Find LibLZMA # -# 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. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - +# Find LibLZMA headers and library +# +# :: +# +# LIBLZMA_FOUND - True if liblzma is found. +# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located. +# LIBLZMA_LIBRARIES - Lzma libraries to link against. +# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required). +# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required). +# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required). +# LIBLZMA_VERSION_MAJOR - The major version of lzma +# LIBLZMA_VERSION_MINOR - The minor version of lzma +# LIBLZMA_VERSION_PATCH - The patch version of lzma +# LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3") find_path(LIBLZMA_INCLUDE_DIR lzma.h ) find_library(LIBLZMA_LIBRARY lzma) @@ -48,9 +41,12 @@ endif() # Avoid using old codebase if (LIBLZMA_LIBRARY) include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) + set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) + set(CMAKE_REQUIRED_QUIET ${LibLZMA_FIND_QUIETLY}) CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER) CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER) CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET) + set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) endif () include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) |