forked from openembedded/meta-openembedded
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redis-plus-plus: introduce fix for library detection
When building static library a substitution for library name was bad. Reported in sewenew/redis-plus-plus#486 and detected when building new version of hiredis that also builds a static library. Signed-off-by: Peter Bergin <[email protected]> Signed-off-by: Peter Bergin <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 608d0f1caf43628c8260a994c277a040f1e616e0 Mon Sep 17 00:00:00 2001 | ||
From: Peter Bergin <[email protected]> | ||
Date: Tue, 23 May 2023 13:19:55 +0200 | ||
Subject: [PATCH] CMakeLists.txt: fix substitution for static libs | ||
|
||
During configuration the liibrary names are substitued for | ||
the static build. When building with tls support the first | ||
substitution will match both cases and trash the name for hiredis_ssl. | ||
|
||
Input string: 'hiredis::hiredis;hiredis::hiredis_ssl;' | ||
Output string: 'hiredis::hiredis_static;hiredis::hiredis_static_ssl;' | ||
Wanted string: 'hiredis::hiredis_static;hiredis::hiredis_ssl_static;' | ||
|
||
Fix string replacement by also including the ';' token to better match. | ||
|
||
Upstream-Status: Submitted [https://github.com/sewenew/redis-plus-plus/issues/486] | ||
|
||
Signed-off-by: Peter Bergin <[email protected]> | ||
--- | ||
CMakeLists.txt | 5 ++--- | ||
1 file changed, 2 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 69794d9..08c265d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -160,13 +160,12 @@ if(REDIS_PLUS_PLUS_BUILD_STATIC) | ||
set(REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS}) | ||
|
||
if (TARGET hiredis::hiredis_static) | ||
- string(REPLACE "hiredis::hiredis" "hiredis::hiredis_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
+ string(REPLACE "hiredis::hiredis;" "hiredis::hiredis_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
"${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}") | ||
endif() | ||
- | ||
if (TARGET hiredis::hiredis_ssl_static) | ||
# If SSL is not enabled, this line will have no effect | ||
- string(REPLACE "hiredis::hiredis_ssl" "hiredis::hiredis_ssl_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
+ string(REPLACE "hiredis::hiredis_ssl;" "hiredis::hiredis_ssl_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
"${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}") | ||
endif() | ||
|
||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters