Module: kamailio
Branch: master
Commit: 001390d802c73e840e57015763a4b6164ae2eb6d
URL:
https://github.com/kamailio/kamailio/commit/001390d802c73e840e57015763a4b61…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2025-01-10T12:17:00Z
cmake: Don't build all utils unless required by modules
- Build always kamctl and kamcmd
- The rest of utils should be included from the module that requires them or a new
add_subdirectory in src/CMakelists.txt
---
Modified: CMakeLists.txt
Modified: src/modules/db_berkeley/CMakeLists.txt
---
Diff:
https://github.com/kamailio/kamailio/commit/001390d802c73e840e57015763a4b61…
Patch:
https://github.com/kamailio/kamailio/commit/001390d802c73e840e57015763a4b61…
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3ccd88160d..d8836184b73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,9 @@ include(${CMAKE_SOURCE_DIR}/cmake/defs.cmake)
add_subdirectory(src)
# Add utils
-add_subdirectory(utils)
+# add_subdirectory(utils)
+add_subdirectory(utils/kamctl)
+add_subdirectory(utils/kamcmd)
# TODO: Packaging stuuf. These should be on different file propably
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
diff --git a/src/modules/db_berkeley/CMakeLists.txt
b/src/modules/db_berkeley/CMakeLists.txt
index 1ff6f84245d..f2884f8e51e 100644
--- a/src/modules/db_berkeley/CMakeLists.txt
+++ b/src/modules/db_berkeley/CMakeLists.txt
@@ -8,4 +8,7 @@ find_package(BerkeleyDB REQUIRED)
target_link_libraries(${module_name} PRIVATE BerkeleyDB::BerkeleyDB)
# Build also the util function found in utils/db_berkeley/
+# This is needed to build the kamdb_recover utility
+add_subdirectory(${CMAKE_SOURCE_DIR}/utils/db_berkeley
+ ${CMAKE_BINARY_DIR}/utils/db_berkeley)
add_dependencies(${module_name} kamdb_recover)