mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-22 06:41:17 +00:00
49294ffa90
Release Notes: https://cmake.org/cmake/help/v3.26/release/3.26.html Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
18 lines
741 B
Diff
18 lines
741 B
Diff
--- a/Modules/FindLibLZMA.cmake
|
|
+++ b/Modules/FindLibLZMA.cmake
|
|
@@ -58,7 +58,13 @@ The following variables are provided for
|
|
|
|
#]=======================================================================]
|
|
|
|
-find_path(LIBLZMA_INCLUDE_DIR lzma.h )
|
|
+if(UNIX)
|
|
+ find_package(PkgConfig QUIET)
|
|
+ pkg_search_module(PC_liblzma liblzma)
|
|
+endif()
|
|
+
|
|
+find_path(LIBLZMA_INCLUDE_DIR lzma.h HINTS ${PC_liblzma_INCLUDEDIR} ${PC_liblzma_INCLUDE_DIRS})
|
|
+find_library(LIBLZMA_LIBRARY NAMES lzma HINTS ${PC_liblzma_LIBDIR} ${PC_liblzma_LIBRARY_DIRS})
|
|
if(NOT LIBLZMA_LIBRARY)
|
|
find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma liblzma NAMES_PER_DIR PATH_SUFFIXES lib)
|
|
find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzmad liblzmad NAMES_PER_DIR PATH_SUFFIXES lib)
|