diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 01:39:47 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 01:39:47 +0200 |
commit | 75816a7ccd9ebb91cb2ba6f4fee11482ea709821 (patch) | |
tree | 15a1240996b87fe631a9d243fe576d431569894b /doc/CMakeLists.txt | |
parent | 09cf6e725bda80270d27c835740ad0aa26c2ea56 (diff) | |
download | fork-ledger-75816a7ccd9ebb91cb2ba6f4fee11482ea709821.tar.gz fork-ledger-75816a7ccd9ebb91cb2ba6f4fee11482ea709821.tar.bz2 fork-ledger-75816a7ccd9ebb91cb2ba6f4fee11482ea709821.zip |
doc: Replace custom command with doxygen_add_docs
CMake function available since 3.9
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 55 |
1 files changed, 42 insertions, 13 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 3b88121b..61e5c077 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -31,19 +31,48 @@ if (USE_DOXYGEN) message(FATAL_ERROR "Could not find doxygen. Reference documentation cannot be built.") endif() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile @ONLY) - - # see INPUT/FILE_PATTERNS in Doxyfile.in - file(GLOB doxygen_input_files ${CMAKE_CURRENT_SOURCE_DIR}/../src/*.h) - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html - COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile ${doxygen_input_files} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Building doxygen documentation") - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html - DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc) - add_custom_target(doc.doxygen DEPENDS html/index.html) + set(DOXYGEN_PROJECT_NUMBER "${Ledger_VERSION_MAJOR}.${Ledger_VERSION_MINOR}.${Ledger_VERSION_PATCH}") + set(DOXYGEN_DOT_IMAGE_FORMAT svg) + set(DOXYGEN_ALWAYS_DETAILED_SEC YES) + set(DOXYGEN_INLINE_INHERITED_MEMB YES) + set(DOXYGEN_FULL_PATH_NAMES NO) + set(DOXYGEN_FILE_PATTERNS "*.h") + set(DOXYGEN_SHORT_NAMES YES) + set(DOXYGEN_JAVADOC_AUTOBRIEF YES) + set(DOXYGEN_TAB_SIZE 8) + set(DOXYGEN_BUILTIN_STL_SUPPORT YES) + set(DOXYGEN_EXTRACT_ALL YES) + set(DOXYGEN_EXTRACT_LOCAL_CLASSES NO) + set(DOXYGEN_HIDE_UNDOC_CLASSES YES) + set(DOXYGEN_INTERNAL_DOCS YES) + set(DOXYGEN_CASE_SENSE_NAMES NO) + set(DOXYGEN_SORT_BRIEF_DOCS YES) + set(DOXYGEN_WARN_IF_UNDOCUMENTED NO) # TODO: set to YES + set(DOXYGEN_WARN_NO_PARAMDOC YES) + set(DOXYGEN_RECURSIVE NO) + set(DOXYGEN_MACRO_EXPANSION YES) + set(DOXYGEN_SOURCE_BROWSER YES) + set(DOXYGEN_GENERATE_TREEVIEW YES) + set(DOXYGEN_REFERENCED_BY_RELATION YES) + set(DOXYGEN_REFERENCES_RELATION YES) + set(DOXYGEN_HTML_EXTRA_STYLESHEET "${CMAKE_CURRENT_SOURCE_DIR}/apidoc.css" "${DOXYGEN_EXTRA_CSS}") + set(DOXYGEN_STRIP_FROM_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../src/") + set(DOXYGEN_HTML_TIMESTAMP YES) + set(DOXYGEN_HTML_DYNAMIC_SECTIONS YES) + set(DOXYGEN_TEMPLATE_RELATIONS YES) + set(DOXYGEN_CALL_GRAPH YES) + set(DOXYGEN_CALLER_GRAPH YES) + set(DOXYGEN_MAX_DOT_GRAPH_DEPTH 1000) + set(DOXYGEN_DOT_MULTI_TARGETS NO) + + doxygen_add_docs(doc.doxygen + "${CMAKE_CURRENT_SOURCE_DIR}/../src" "${CMAKE_CURRENT_SOURCE_DIR}/mainpage.txt" + COMMENT "Generating API documentation") + + if(CMAKE_INSTALL_DOCDIR) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc) + endif() else() add_custom_target(doc.doxygen) endif() |