2019-03-29 21:50:08 +01:00
|
|
|
# Building doxygen documentation
|
|
|
|
|
|
|
|
|
|
find_package(Doxygen)
|
|
|
|
|
|
2024-04-25 01:23:15 +02:00
|
|
|
if(SDBUSCPP_BUILD_DOXYGEN_DOCS)
|
2019-04-25 13:34:33 +02:00
|
|
|
if(DOXYGEN_FOUND)
|
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
2019-03-29 21:50:08 +01:00
|
|
|
|
2019-04-25 13:34:33 +02:00
|
|
|
add_custom_target(doc
|
|
|
|
|
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
COMMENT "Generating API documentation with Doxygen"
|
|
|
|
|
VERBATIM)
|
2019-03-29 21:50:08 +01:00
|
|
|
|
2021-04-29 08:46:36 -06:00
|
|
|
# workaround bug https://github.com/doxygen/doxygen/pull/6787
|
|
|
|
|
add_custom_command(TARGET doc POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/sdbus-c++-class-diagram.png ${CMAKE_CURRENT_BINARY_DIR}/html/.)
|
2019-04-25 13:34:33 +02:00
|
|
|
else()
|
|
|
|
|
message(WARNING "Documentation enabled, but Doxygen cannot be found")
|
|
|
|
|
endif()
|
2019-03-29 21:50:08 +01:00
|
|
|
endif()
|
2019-04-25 12:42:08 +02:00
|
|
|
|
2024-02-10 20:20:42 +01:00
|
|
|
if(SDBUSCPP_INSTALL)
|
|
|
|
|
install(FILES sdbus-c++-class-diagram.png
|
|
|
|
|
sdbus-c++-class-diagram.uml
|
|
|
|
|
systemd-dbus-config.md
|
|
|
|
|
using-sdbus-c++.md
|
2024-02-10 20:30:22 +01:00
|
|
|
DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT sdbus-c++-doc)
|
2024-02-10 20:20:42 +01:00
|
|
|
|
2024-04-25 01:23:15 +02:00
|
|
|
if (SDBUSCPP_BUILD_DOXYGEN_DOCS AND DOXYGEN_FOUND)
|
2024-02-10 20:30:22 +01:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL COMPONENT sdbus-c++-doc)
|
2024-02-10 20:20:42 +01:00
|
|
|
endif()
|
|
|
|
|
endif()
|