mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
3848cf458e
Saves a little bit of time when compiling cmake. Added patches to fix searching liblzma and zlib. The issue is that because pkgconfig is not used, the system libraries get used. Signed-off-by: Rosen Penev <rosenp@gmail.com>
18 lines
783 B
Diff
18 lines
783 B
Diff
--- a/Modules/FindLibLZMA.cmake
|
|
+++ b/Modules/FindLibLZMA.cmake
|
|
@@ -43,7 +43,13 @@ This module will set the following varia
|
|
version number as a string (ex: "5.0.3")
|
|
#]=======================================================================]
|
|
|
|
-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)
|