Module: kamailio Branch: master Commit: 394cc191e172f49525c91e3540eb590edf8bd101 URL: https://github.com/kamailio/kamailio/commit/394cc191e172f49525c91e3540eb590e...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos xk@gilawa.com Date: 2024-12-03T15:14:15Z
cmake: Refines uninstall script and updates CMake options
- Modifies uninstall logic removing duplicate file entries when both .cfg and .cfg sample are installed
- Remove unused SCTP and duplicate fast memory statistics options in CMake
---
Modified: cmake/cmake_uninstall.cmake.in Modified: cmake/defs.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/394cc191e172f49525c91e3540eb590e... Patch: https://github.com/kamailio/kamailio/commit/394cc191e172f49525c91e3540eb590e...
---
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in index 333534f3068..1087faf024e 100644 --- a/cmake/cmake_uninstall.cmake.in +++ b/cmake/cmake_uninstall.cmake.in @@ -6,10 +6,12 @@ if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) -list(APPEND files "@CMAKE_INSTALL_PREFIX@/etc/kamailio/kamailio.cfg") -list(APPEND files "@CMAKE_INSTALL_PREFIX@/etc/kamailio/kamctlrc") - string(REGEX REPLACE "\n" ";" files "${files}") + +list(APPEND files "@CMAKE_INSTALL_PREFIX@/etc/@MAIN_NAME@/@CFG_NAME@.cfg") +list(APPEND files "@CMAKE_INSTALL_PREFIX@/etc/@MAIN_NAME@/kamctlrc") +list(REMOVE_DUPLICATES files) + foreach(file ${files}) message(STATUS "Uninstalling $ENV{DESTDIR}${file}") if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") @@ -26,7 +28,7 @@ foreach(file ${files}) if(NOT "${rm_retval}" STREQUAL 0) message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") endif() - else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + else() message(STATUS "File $ENV{DESTDIR}${file} does not exist.") endif() endforeach() diff --git a/cmake/defs.cmake b/cmake/defs.cmake index c3a338ec5ea..10940d2030c 100644 --- a/cmake/defs.cmake +++ b/cmake/defs.cmake @@ -45,7 +45,6 @@ endif() option(KMSTATS "Kamailio statistics" ON) option(FMSTATS "Fast memory statistics" ON) option(WITHAS "With Application server support" ON) -option(SCTP "SCTP support" ON) option(RAW_SOCKS "Raw sockets support" ON) option(MEMPKG "Package memory or sys " ON)
@@ -80,7 +79,6 @@ option(USE_DST_BLOCKLIST "Use destination blacklist" ON) option(HAVE_RESOLV_RES "Have resolv_res" ON)
option(KSR_PTHREAD_MUTEX_SHARED "Use shared mutex for TLS" ON) -option(FMSTATS "Fast memory statistics" ON) option(STATISTICS "Statistics" ON) # if(${MEMPKG}) target_compile_definitions(common INTERFACE PKG_MALLOC) else() # if(${MEMDBGSYS}) target_compile_definitions(common INTERFACE DDBG_SYS_MEMORY) @@ -271,8 +269,6 @@ if(NO_DEV_POLL) target_compile_definitions(common INTERFACE NO_DEV_POLL) endif()
-# if(USE_SCTP) target_compile_definitions(common INTERFACE USE_SCTP) endif() - if(RAW_SOCKS) target_compile_definitions(common INTERFACE RAW_SOCKS) endif()