# --------------------------------------------------------------------- # Code reference (Doxygen) — optional 'docs' target # # The output paths come from the top-level file, which defines them # before adding this directory so that each is written in one place. # --------------------------------------------------------------------- option(DPM_DOCS_HTML "Generate the code reference in HTML" ON) option(DPM_DOCS_PDF "Generate the code reference as PDF (requires LaTeX)" ON) find_package(Doxygen) if(DOXYGEN_FOUND) # Doxygen and LaTeX both work in scratch space under docs/tmp. The # finished document is copied up into docs/, so the directory a user # opens holds documentation and nothing else. set(DOXYGEN_OUTPUT_DIRECTORY ${DPM_DOCS_TMP_DIR}) set(DOXYGEN_EXTRACT_ALL YES) set(DOXYGEN_EXTRACT_STATIC YES) set(DOXYGEN_QUIET YES) set(DOXYGEN_WARN_IF_UNDOCUMENTED NO) set(DOXYGEN_JAVADOC_AUTOBRIEF YES) if(DPM_DOCS_HTML) set(DOXYGEN_GENERATE_HTML YES) else() set(DOXYGEN_GENERATE_HTML NO) endif() if(DPM_DOCS_PDF) set(DOXYGEN_GENERATE_LATEX YES) set(DOXYGEN_USE_PDFLATEX YES) set(DOXYGEN_PDF_HYPERLINKS YES) else() set(DOXYGEN_GENERATE_LATEX NO) endif() # The prose documents, each rendered as its own page in the generated # reference. Named one per line so the set of documents reaching the # output is stated here instead of implied by a directory. set(DPM_DOC_PAGES ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/OVERVIEW.md ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/DESIGN.md ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/CONSUMERS.md ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/MODULES.md ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/BUILD.md ${CMAKE_CURRENT_SOURCE_DIR}/PROSE/DOCUMENTATION.md ) # Two kinds of input: include/ and src/ supply the API and internals # reference extracted from the source, DPM_DOC_PAGES supplies the # prose pages. # # One target, so `cmake --build