mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 14:41:12 +04:00
Instead of carrying 110-liblzma.patch and 140-zlib.patch, which make
FindLibLZMA and FindZLIB search with pkg-config, pass the staging
include and library paths to CMake's bootstrap script. This avoids
refreshing the patches on every CMake update.
LIBLZMA_INCLUDE_DIR, LIBLZMA_LIBRARY, ZLIB_INCLUDE_DIR and ZLIB_LIBRARY
are cache variables, so setting them skips the search, and CMake links
the static libraries from staging instead of the host ones.
This replaces the patches introduced in 3848cf458e ("tools/cmake:
Build without some included libs").
Tested on Linux with the host zlib and liblzma development packages
installed: cmake, ctest and cpack link the staging libraries.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/26619
Signed-off-by: Robert Marko <robimarko@gmail.com>