Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Oct 30, 2023

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

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 when importing an
already installed hiredis library and use correct name directly.
@bjosv bjosv merged commit eb9b8f5 into Nordix:master Nov 1, 2023
32 checks passed
@bjosv bjosv deleted the fix-old-cmake-builds branch November 1, 2023 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target "hiredis::hiredis" because target "hiredis" is not a library
1 participant