redis++_static should link to hiredis_static #392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thanks for the project I've been finding it very useful!
This pull request is fairly simple, it allows the
redis++_static
target to link to thehiredis_static
target instead of the currenthiredis
target.My project uses the static version of redis++ because it's intended to be deployed on embedded devices, and having as many dependencies included in the
libredis++.a
library makes configuration management much easier. Becauselibredis++.a
currently links tolibhiredis.so
, I need to make sure that all deployment devices also receive the exact version oflibhiredis.so
, a problem is made a little more difficult because the hiredis can't be built in the same project, redis++ expects to find hiredis installed at the system level. (This PR for reference)The proposed PR introduces the cmake variable
REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC
, which is constructed fromREDIS_PLUS_PLUS_HIREDIS_LIBS
, but appends_static
where necessary. I have tested on version with and without SSL.Let me know if you have any questions, or if other edits are necessary.
Thanks