mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
c456c5592e
Update cmake to version 3.30.2 Release notes: https://cmake.org/cmake/help/v3.30/release/3.30.html Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> Link: https://github.com/openwrt/openwrt/pull/16059 Signed-off-by: Robert Marko <robimarko@gmail.com>
21 lines
717 B
Diff
21 lines
717 B
Diff
--- a/Modules/FindZLIB.cmake
|
|
+++ b/Modules/FindZLIB.cmake
|
|
@@ -120,10 +120,13 @@ else()
|
|
set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibwapid zlibvcd zlibstatd)
|
|
endif()
|
|
|
|
-# Try each search configuration.
|
|
-foreach(search ${_ZLIB_SEARCHES})
|
|
- find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
|
-endforeach()
|
|
+if(UNIX)
|
|
+ find_package(PkgConfig QUIET)
|
|
+ pkg_search_module(PC_zlib zlib)
|
|
+endif()
|
|
+
|
|
+find_path(ZLIB_INCLUDE_DIR zlib.h HINTS ${PC_zlib_INCLUDEDIR} ${PC_zlib_INCLUDE_DIRS})
|
|
+find_library(ZLIB_LIBRARY NAMES z HINTS ${PC_zlib_LIBDIR} ${PC_zlib_LIBRARY_DIRS})
|
|
|
|
# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library
|
|
if(NOT ZLIB_LIBRARY)
|