Nordix / hiredis-cluster

C client library for Valkey/Redis Cluster. This project is used and sponsored by Ericsson. It is a fork of the now unmaintained hiredis-vip.
BSD 3-Clause "New" or "Revised" License
86 stars 42 forks source link

Fix builds when using CMake < v3.15 and preinstalled `hiredis` #196

Closed bjosv closed 10 months ago

bjosv commented 10 months ago

CMake before version 3.15 does not support creating an ALIAS library for a library of UNKNOWN type via its command add_library(). Due to other fixes we can now skip the alias step (hiredis -> hiredis:hiredis) when importing an already installed hiredis library and give it correct name directly in our CMakeLists.txt. The created hiredis:hiredis library reference is required by CMake to be able to build hiredis-cluster. hiredis::hiredis_ssl is handled in the same fashion.

Fixes #173