Module: kamailio Branch: 6.0 Commit: 1a93503ba82bd0227e774938bcf0d706cd8513a7 URL: https://github.com/kamailio/kamailio/commit/1a93503ba82bd0227e774938bcf0d706cd8513a7
Author: Xenofon Karamanos <[email protected]> Committer: Xenofon Karamanos <[email protected]> Date: 2025-10-06T11:29:38Z ndb_redis: cmake: Update for hiredis_ssl (cherry picked from commit 829dce8e9de586f1269be2f58f9a7f58cc81e2b1) --- Modified: src/modules/ndb_redis/CMakeLists.txt --- Diff: https://github.com/kamailio/kamailio/commit/1a93503ba82bd0227e774938bcf0d706cd8513a7.diff Patch: https://github.com/kamailio/kamailio/commit/1a93503ba82bd0227e774938bcf0d706cd8513a7.patch --- diff --git a/src/modules/ndb_redis/CMakeLists.txt b/src/modules/ndb_redis/CMakeLists.txt index c4ca770ac33..18cba4d3071 100644 --- a/src/modules/ndb_redis/CMakeLists.txt +++ b/src/modules/ndb_redis/CMakeLists.txt @@ -3,7 +3,26 @@ file(GLOB MODULE_SOURCES "*.c") add_library(${module_name} SHARED ${MODULE_SOURCES}) find_package(PkgConfig REQUIRED) -pkg_check_modules(redis REQUIRED IMPORTED_TARGET hiredis) -add_library(redis::redis ALIAS PkgConfig::redis) +pkg_check_modules(hiredis REQUIRED IMPORTED_TARGET hiredis) +add_library(hiredis::hiredis ALIAS PkgConfig::hiredis) -target_link_libraries(${module_name} PRIVATE redis::redis) +target_link_libraries(${module_name} PRIVATE hiredis::hiredis) + +# Check for hiredis SSL support +pkg_check_modules(hiredis_ssl IMPORTED_TARGET hiredis_ssl) + +if(hiredis_ssl_FOUND) + find_package(OpenSSL REQUIRED) + # hiredis_ssl found via pkg-config + message(STATUS "hiredis_ssl found via pkg-config") + add_library(hiredis_ssl::hiredis_ssl ALIAS PkgConfig::hiredis_ssl) + target_compile_definitions(${module_name} PRIVATE WITH_SSL) + target_link_libraries(${module_name} PRIVATE hiredis_ssl::hiredis_ssl) + # https://github.com/redis/hiredis?tab=readme-ov-file#using-it + target_link_libraries(${module_name} PRIVATE OpenSSL::SSL OpenSSL::Crypto) +endif() + +# TODO: Revise when this definition is needed +# ifeq (,$(findstring hiredis,$(HIREDISDEFS))) +# DEFS+=-DWITH_HIREDIS_PATH +# endif _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
