Module: kamailio
Branch: master
Commit: c13053e0d015391ceb76161375ca8389af40158d
URL: 
https://github.com/kamailio/kamailio/commit/c13053e0d015391ceb76161375ca8389af40158d

Author: Xenofon Karamanos <[email protected]>
Committer: Xenofon Karamanos <[email protected]>
Date: 2026-01-13T10:55:21Z

rabbitmq: cmake: Use pkgconfig to find it

- v0.11 (bookworm) reports wrong version (4.5.0) when used which adds the 
defintion and breaks the build

---

Modified: src/modules/rabbitmq/CMakeLists.txt

---

Diff:  
https://github.com/kamailio/kamailio/commit/c13053e0d015391ceb76161375ca8389af40158d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c13053e0d015391ceb76161375ca8389af40158d.patch

---

diff --git a/src/modules/rabbitmq/CMakeLists.txt 
b/src/modules/rabbitmq/CMakeLists.txt
index e9bcef86b58..4c023f1a706 100644
--- a/src/modules/rabbitmq/CMakeLists.txt
+++ b/src/modules/rabbitmq/CMakeLists.txt
@@ -3,15 +3,15 @@ file(GLOB MODULE_SOURCES "*.c")
 add_library(${module_name} SHARED ${MODULE_SOURCES})
 
 # rabbitmq provides cmake support for versions 0.13 and above.
-find_package(rabbitmq-c QUIET)
-if(NOT rabbitmq-c_FOUND)
-  message(STATUS "rabbitmq-c not found. looking with pkg-config")
-  find_package(PkgConfig REQUIRED)
-  pkg_check_modules(rabbitmq-c REQUIRED IMPORTED_TARGET librabbitmq)
-  add_library(rabbitmq::rabbitmq ALIAS PkgConfig::rabbitmq-c)
-endif()
-
+# 0.11 provides cmake files but they are broken (report wrong version).
+# 
https://github.com/alanxz/rabbitmq-c/commit/20bebf423bd3686fe73634ae239d09e5d21abde4
+# Use pkg-config for all versions
+# TODO: When we have a proper cmake config file for rabbitmq-c for most OS, we 
can
+# use that instead of pkg-config.
 find_package(PkgConfig REQUIRED)
+pkg_check_modules(rabbitmq-c REQUIRED IMPORTED_TARGET librabbitmq)
+add_library(rabbitmq::rabbitmq ALIAS PkgConfig::rabbitmq-c)
+
 pkg_check_modules(UUID REQUIRED IMPORTED_TARGET uuid)
 add_library(uuid::uuid ALIAS PkgConfig::UUID)
 

_______________________________________________
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!

Reply via email to