Module: kamailio
Branch: master
Commit: e51ae9297140150ad06fdc806324228b142f71e2
URL:
https://github.com/kamailio/kamailio/commit/e51ae9297140150ad06fdc806324228…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2025-01-10T11:12:39Z
cmake: Add kamdb_recover util program
- Add it as dependency to db_berkeley module
---
Added: utils/db_berkeley/CMakeLists.txt
Modified: src/modules/db_berkeley/CMakeLists.txt
---
Diff:
https://github.com/kamailio/kamailio/commit/e51ae9297140150ad06fdc806324228…
Patch:
https://github.com/kamailio/kamailio/commit/e51ae9297140150ad06fdc806324228…
---
diff --git a/src/modules/db_berkeley/CMakeLists.txt
b/src/modules/db_berkeley/CMakeLists.txt
index 46aee7c2bd7..1ff6f84245d 100644
--- a/src/modules/db_berkeley/CMakeLists.txt
+++ b/src/modules/db_berkeley/CMakeLists.txt
@@ -6,3 +6,6 @@ add_library(${module_name} SHARED ${MODULE_SOURCES})
find_package(BerkeleyDB REQUIRED)
target_link_libraries(${module_name} PRIVATE BerkeleyDB::BerkeleyDB)
+
+# Build also the util function found in utils/db_berkeley/
+add_dependencies(${module_name} kamdb_recover)
diff --git a/utils/db_berkeley/CMakeLists.txt b/utils/db_berkeley/CMakeLists.txt
new file mode 100644
index 00000000000..e6b8fddbc9f
--- /dev/null
+++ b/utils/db_berkeley/CMakeLists.txt
@@ -0,0 +1,12 @@
+find_package(BerkeleyDB REQUIRED)
+
+add_executable(kamdb_recover EXCLUDE_FROM_ALL)
+
+target_sources(kamdb_recover PRIVATE kambdb_recover.c)
+
+target_link_libraries(kamdb_recover PRIVATE BerkeleyDB::BerkeleyDB)
+
+install(
+ TARGETS kamdb_recover
+ DESTINATION ${CMAKE_INSTALL_SBINDIR}
+ OPTIONAL)