Commit 03a08b5c authored by Jason Rhinelander's avatar Jason Rhinelander

Added doxygen API documentation generation

parent e6dd8a8e
......@@ -103,6 +103,10 @@ foreach(exec ${fracdist_programs})
target_link_libraries(${exec} fracdist)
endforeach()
add_subdirectory(doc EXCLUDE_FROM_ALL)
set(CPACK_PACKAGE_VERSION_MAJOR ${fracdist_VMAJ})
set(CPACK_PACKAGE_VERSION_MINOR ${fracdist_VMIN})
set(CPACK_PACKAGE_VERSION_PATCH ${fracdist_VPAT})
......
# Need at least version 1.8.2 (as that was when c++11 support was added to doxygen)
find_package(Doxygen 1.8.2 REQUIRED)
if(NOT DOXYGEN_DOT_FOUND)
message(FATAL_ERROR "Could NOT find dot (required by doxygen)")
endif()
add_custom_target(doc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml.in ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml @ONLY)
# Use a custom command to output doxygen's generated index file. Doing it this way ensures
# that 'make doc' only runs doxygen when something in src or include has changed.
add_custom_command(OUTPUT "api/index.xhtml"
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS "Doxyfile.in" ${fracdist_headers} ${fracdist_source} data
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Generating API documentation (using doxygen)"
)
add_custom_target(api_doc DEPENDS "api/index.xhtml")
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/api")
#set_property(DIRECTORY APPEND PROPERTY
# ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/api-latex")
add_dependencies(api_doc data)
add_dependencies(doc api_doc)
install(DIRECTORY api
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT doc)
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = @PROJECT_NAME@
PROJECT_NUMBER = v@fracdist_VMAJ@.@fracdist_VMIN@.@fracdist_VPAT@
PROJECT_BRIEF = "@fracdist_description@"
INPUT = README.md BUILDING.md fracdist
EXCLUDE_PATTERNS = *build build*
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.hpp
RECURSIVE = YES
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
QUIET = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
JAVADOC_AUTOBRIEF = YES
GENERATE_HTML = YES
HTML_FILE_EXTENSION = .html
HTML_OUTPUT = api
#LAYOUT_FILE = DoxygenLayout.xml
USE_MDFILE_AS_MAINPAGE = README.md
GENERATE_LATEX = NO
LATEX_OUTPUT = api-latex
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
PAPER_TYPE = letter
HAVE_DOT = YES
DOT_IMAGE_FORMAT = svg
USE_MATHJAX = YES
# Use default (cdn-hosted) MathJax
#MATHJAX_RELPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
#CALL_GRAPH = YES
#CALLER_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
HTML_DYNAMIC_SECTIONS = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment