Browse Source

cmake: Install README from source tree

- module_name_doc target will only produce the formats found in the build folder.
- module_name_readme target that modifies the source tree needs to be called explicitly
Xenofon Karamanos 8 months ago
parent
commit
2692148d92
1 changed files with 2 additions and 7 deletions
  1. 2 7
      cmake/modules-docs.cmake

+ 2 - 7
cmake/modules-docs.cmake

@@ -95,7 +95,6 @@ function(docs_add_module module_name)
   add_custom_target(
     ${module_name}_doc
     DEPENDS ${module_name}_doc_text ${module_name}_doc_html
-            ${module_name}_readme
     COMMENT "Processing target ${module_name}_doc")
 
   # Each version has seperate custon commands for not recompiling all if 1 gets
@@ -146,13 +145,9 @@ function(docs_add_module module_name)
     endif()
 
     install(
-      FILES ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt
+      FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README
       RENAME README.${module_name}
       DESTINATION ${CMAKE_INSTALL_DOCDIR}/modules
-      COMPONENT kamailio_docs
-      # Since the depepndencies might not have been build as they are not in the
-      # default target and required to build explicitly using `make
-      # kamailio_docs`, allow them to be optional.
-      OPTIONAL)
+      COMPONENT kamailio_docs)
   endif()
 endfunction()