summaryrefslogtreecommitdiff
path: root/CMake/FindLZMA.cmake
blob: 6abc4fa7784c6739b5f588c90fd2d34c49de7372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# - Try to find LZMA
# Once done, this will define
#
#  LZMA_FOUND - system has LZMA
#  LZMA_INCLUDE_DIRS - the LZMA include directories
#  LZMA_LIBRARIES - the LZMA library
find_package(PkgConfig)

pkg_check_modules(LZMA_PKGCONF liblzma)

find_path(LZMA_INCLUDE_DIRS
  NAMES lzma.h
  PATHS ${LZMA_PKGCONF_INCLUDE_DIRS}
)


find_library(LZMA_LIBRARIES
  NAMES lzma
  PATHS ${LZMA_PKGCONF_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LZMA DEFAULT_MSG LZMA_INCLUDE_DIRS LZMA_LIBRARIES)

mark_as_advanced(LZMA_INCLUDE_DIRS LZMA_LIBRARIES)