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.
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()