CMake: rework documentation creation section
authorYegor Yefremov <yegorslists@googlemail.com>
Thu, 31 Aug 2023 07:23:30 +0000 (09:23 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 1 Sep 2023 16:10:22 +0000 (18:10 +0200)
Add comments and also make the if ( DOCUMENTATION ) section more
readable.

CMakeLists.txt

index 9d7f9b6..1745dc8 100644 (file)
@@ -137,11 +137,16 @@ if ( DOCUMENTATION )
     OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html
     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc
     COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+    COMMENT "Generating API documentation"
     DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers}
   )
 
-  add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html)
-endif ()
+  add_custom_target(
+    docs ALL
+    COMMENT "Documentation target docs"
+    DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html
+  )
+endif ( DOCUMENTATION )
 
 add_subdirectory(src)
 if ( FTDIPP )