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

Author: Xenofon Karamanos <x...@gilawa.com>
Committer: Xenofon Karamanos <xenakiskarama...@gmail.com>
Date: 2025-05-19T16:58:32+03:00

cmake: Add check and warning for module docs

---

Modified: src/modules/CMakeLists.txt

---

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

---

diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index 33948dc9f6c..dea294090a6 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -107,8 +107,14 @@ function(add_module_group group_name group_modules)
         )
         # Add the module to the list of added modules
         set_property(GLOBAL APPEND PROPERTY ADDED_MODULES_LIST ${module_name})
-        docs_add_module(${group_name} ${module_name})
-        set_property(GLOBAL APPEND PROPERTY ALL_MODULE_DOC_TARGETS 
${module_name}_doc)
+        if(NOT EXISTS 
${CMAKE_SOURCE_DIR}/src/modules/${module_name}/doc/${module_name}.xml)
+          message(WARNING "No documentation found for module ${module_name}.")
+          return()
+        else()
+          docs_add_module(${group_name} ${module_name})
+          set_property(GLOBAL APPEND PROPERTY ALL_MODULE_DOC_TARGETS 
${module_name}_doc)
+        endif()
+
       else()
         message(FATAL_ERROR "Module directory ${module_path} does not exist.")
       endif()

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to