]> git.saurik.com Git - apt.git/blob - CMake/FindLZ4.cmake
The entire concept of PendingError() is flawed :/.
[apt.git] / CMake / FindLZ4.cmake
1 # - Try to find LZ4
2 # Once done, this will define
3 #
4 # LZ4_FOUND - system has LZ4
5 # LZ4_INCLUDE_DIRS - the LZ4 include directories
6 # LZ4_LIBRARIES - the LZ4 library
7 find_package(PkgConfig)
8
9 pkg_check_modules(LZ4_PKGCONF liblz4)
10
11 find_path(LZ4_INCLUDE_DIRS
12 NAMES lz4frame.h
13 PATHS ${LZ4_PKGCONF_INCLUDE_DIRS}
14 )
15
16
17 find_library(LZ4_LIBRARIES
18 NAMES lz4
19 PATHS ${LZ4_PKGCONF_LIBRARY_DIRS}
20 )
21
22 include(FindPackageHandleStandardArgs)
23 find_package_handle_standard_args(LZ4 DEFAULT_MSG LZ4_INCLUDE_DIRS LZ4_LIBRARIES)
24
25 mark_as_advanced(LZ4_INCLUDE_DIRS LZ4_LIBRARIES)