]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Cleanup of cmake doc-related targets
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 20 Nov 2018 12:56:39 +0000 (13:56 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 20 Nov 2018 12:56:39 +0000 (13:56 +0100)
There is now a top-level target "doc" that is always built.
Depending on the detected generators it depends on optional
targets like apidoc' and 'devhelp2'.

cmake/doc/CMakeLists.txt

index 11634e1b1189d350074ec34859c08f459618b9f3..403aee7840b79b031517d562001eca30a587e376 100644 (file)
@@ -2,6 +2,9 @@ SET(DOC_DIR ${CMAKE_SOURCE_DIR}/../doc)
 
 find_package(Doxygen)
 
+# build doc always
+add_custom_target(doc ALL)
+
 if(DOXYGEN_EXECUTABLE)
   OPTION(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON)
 endif(DOXYGEN_EXECUTABLE)
@@ -14,9 +17,15 @@ if (DBUS_ENABLE_DOXYGEN_DOCS)
         COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     )
-    add_custom_target(doc
+    add_custom_target(apidoc
+        COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    )
+    add_dependencies(doc apidoc)
+    add_custom_target(devhelp2
         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.html ${CMAKE_CURRENT_BINARY_DIR}/dbus.devhelp2
     )
+    add_dependencies(doc devhelp2)
 endif (DBUS_ENABLE_DOXYGEN_DOCS)
 
 find_program(XSLTPROC_EXECUTABLE xsltproc)