diff options
| author | Peter Bergin <peter.bergin@windriver.com> | 2023-05-23 14:07:40 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-05-23 15:04:38 -0700 |
| commit | 48297a8f75b9d7b507ab90058dd5de286722bce6 (patch) | |
| tree | 6e7f36ac3d6da0c7642c499faa59e6e8c67fbbf9 /meta-oe/recipes-extended/redis-plus-plus/files | |
| parent | ea516e9563e5c827466fd8ca674e5ab1cc8cd5f9 (diff) | |
| download | meta-openembedded-48297a8f75b9d7b507ab90058dd5de286722bce6.tar.gz | |
redis-plus-plus: introduce fix for library detection
When building static library a substitution for library name
was bad. Reported in https://github.com/sewenew/redis-plus-plus/issues/486
and detected when building new version of hiredis that also builds
a static library.
Signed-off-by: Peter Bergin <peter.bergin@windriver.com>
Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/redis-plus-plus/files')
| -rw-r--r-- | meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch b/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch new file mode 100644 index 0000000000..627b929b4d --- /dev/null +++ b/meta-oe/recipes-extended/redis-plus-plus/files/0001-CMakeLists.txt-fix-substitution-for-static-libs.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 608d0f1caf43628c8260a994c277a040f1e616e0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Bergin <peter.bergin@windriver.com> | ||
| 3 | Date: Tue, 23 May 2023 13:19:55 +0200 | ||
| 4 | Subject: [PATCH] CMakeLists.txt: fix substitution for static libs | ||
| 5 | |||
| 6 | During configuration the liibrary names are substitued for | ||
| 7 | the static build. When building with tls support the first | ||
| 8 | substitution will match both cases and trash the name for hiredis_ssl. | ||
| 9 | |||
| 10 | Input string: 'hiredis::hiredis;hiredis::hiredis_ssl;' | ||
| 11 | Output string: 'hiredis::hiredis_static;hiredis::hiredis_static_ssl;' | ||
| 12 | Wanted string: 'hiredis::hiredis_static;hiredis::hiredis_ssl_static;' | ||
| 13 | |||
| 14 | Fix string replacement by also including the ';' token to better match. | ||
| 15 | |||
| 16 | Upstream-Status: Submitted [https://github.com/sewenew/redis-plus-plus/issues/486] | ||
| 17 | |||
| 18 | Signed-off-by: Peter Bergin <peter.bergin@windriver.com> | ||
| 19 | --- | ||
| 20 | CMakeLists.txt | 5 ++--- | ||
| 21 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 24 | index 69794d9..08c265d 100644 | ||
| 25 | --- a/CMakeLists.txt | ||
| 26 | +++ b/CMakeLists.txt | ||
| 27 | @@ -160,13 +160,12 @@ if(REDIS_PLUS_PLUS_BUILD_STATIC) | ||
| 28 | set(REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS}) | ||
| 29 | |||
| 30 | if (TARGET hiredis::hiredis_static) | ||
| 31 | - string(REPLACE "hiredis::hiredis" "hiredis::hiredis_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
| 32 | + string(REPLACE "hiredis::hiredis;" "hiredis::hiredis_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
| 33 | "${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}") | ||
| 34 | endif() | ||
| 35 | - | ||
| 36 | if (TARGET hiredis::hiredis_ssl_static) | ||
| 37 | # If SSL is not enabled, this line will have no effect | ||
| 38 | - string(REPLACE "hiredis::hiredis_ssl" "hiredis::hiredis_ssl_static" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
| 39 | + string(REPLACE "hiredis::hiredis_ssl;" "hiredis::hiredis_ssl_static;" REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC | ||
| 40 | "${REDIS_PLUS_PLUS_HIREDIS_LIBS_STATIC}") | ||
| 41 | endif() | ||
| 42 | |||
| 43 | -- | ||
| 44 | 2.34.1 | ||
| 45 | |||
