Skip to content
Snippets Groups Projects
Commit 8c891303 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Add make docs option to CMake

This will build the Doxygen Documentation for the code
parent fe44ad96
No related branches found
No related tags found
No related merge requests found
...@@ -440,3 +440,26 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src) ...@@ -440,3 +440,26 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src)
if(BUILD_TESTS) if(BUILD_TESTS)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/tests/googletest/) add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/tests/googletest/)
endif() endif()
# Doxygen
# look for Doxygen package
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.out)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
# Note: do not put "ALL" - this builds docs together with application EVERY TIME!
add_custom_target( docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
...@@ -52,7 +52,7 @@ PROJECT_LOGO = ...@@ -52,7 +52,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location # If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used. # where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = doc/ OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc/
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output # 4096 sub-directories (in 2 levels) under the output directory of each output
...@@ -668,7 +668,7 @@ WARN_LOGFILE = ...@@ -668,7 +668,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = src INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
...@@ -919,7 +919,7 @@ HTML_FOOTER = ...@@ -919,7 +919,7 @@ HTML_FOOTER =
# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
# tag will in the future become obsolete. # tag will in the future become obsolete.
HTML_STYLESHEET = css_files/theme.css HTML_STYLESHEET =
# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
# user-defined cascading style sheet that is included after the standard # user-defined cascading style sheet that is included after the standard
...@@ -929,7 +929,7 @@ HTML_STYLESHEET = css_files/theme.css ...@@ -929,7 +929,7 @@ HTML_STYLESHEET = css_files/theme.css
# robust against future updates. Doxygen will copy the style sheet file to # robust against future updates. Doxygen will copy the style sheet file to
# the output directory. # the output directory.
HTML_EXTRA_STYLESHEET = css_files/theme_extra.css HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note # other source files which should be copied to the HTML output directory. Note
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment