]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Improve message when pkg-config can’t find libhiredis
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 30 Jul 2021 08:19:35 +0000 (10:19 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 30 Jul 2021 08:19:35 +0000 (10:19 +0200)
pkg_check_modules stops immediately when given the REQUIRED argument so
the nicer error message won’t be reached. Fix this by simply removing
REQUIRED since that will make the configuration step fail in a better
way.

cmake/Findhiredis.cmake

index 51d0ed0ba913d9a70a8eb2b3d306212ca7d956b9..1369637f77344f02da185452df38c4378d69970f 100644 (file)
@@ -52,7 +52,7 @@ if(HIREDIS_FROM_INTERNET)
 else()
   find_package(PkgConfig)
   if(PKG_CONFIG_FOUND)
-    pkg_check_modules(HIREDIS REQUIRED hiredis>=${hiredis_FIND_VERSION})
+    pkg_check_modules(HIREDIS hiredis>=${hiredis_FIND_VERSION})
     find_library(HIREDIS_LIBRARY ${HIREDIS_LIBRARIES} HINTS ${HIREDIS_LIBDIR})
     find_path(HIREDIS_INCLUDE_DIR hiredis/hiredis.h HINTS ${HIREDIS_PREFIX}/include)
   else()