Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional input directories to parse when generating documentation #111

Merged
merged 2 commits into from
Sep 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cmake/IgnCreateDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# [API_MAINPAGE_MD <api_markdown_mainpage>]
# [AUTOGENERATED_DOC <generated doc dir>]
# [TUTORIALS_MAINPAGE_MD <tutorials_markdown_mainpage>]
# [ADDITIONAL_INPUT_DIRS <directory_list>]
# [TAGFILES <tagfile_list>])
#
# This function will configure doxygen templates and install them.
Expand All @@ -35,6 +36,7 @@
# AUTOGENERATED_DOC: Optional. Directory with the generated code.
# TUTORIALS_MAINPAGE_MD: Optional. Specify a Markdown page to use as the
# main page for tutorial documentation.
# ADDITIONAL_INPUT_DIRS: Optional. Specify additional input directories to parse when generating documentation.
# TAGFILES: Optional. Specify tagfiles for doxygen to use. It should be a list of strings like:
# "${IGNITION-<DESIGNATION>_DOXYGEN_TAGFILE} = ${IGNITION-<DESIGNATION>_API_URL}"
function(ign_create_docs)
Expand All @@ -43,7 +45,7 @@ function(ign_create_docs)
# Define the expected arguments
set(options)
set(oneValueArgs API_MAINPAGE_MD AUTOGENERATED_DOC TUTORIALS_MAINPAGE_MD)
set(multiValueArgs "TAGFILES")
set(multiValueArgs "TAGFILES" "ADDITIONAL_INPUT_DIRS")

#------------------------------------
# Parse the arguments
Expand Down Expand Up @@ -119,6 +121,12 @@ function(ign_create_docs)
ign_string_append(IGNITION_DOXYGEN_TAGFILES "\"${tagfile}\"" DELIM " \\\\\\\\\n ")
endforeach()

set(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS " ")

foreach(dir ${ign_create_docs_ADDITIONAL_INPUT_DIRS})
ign_string_append(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS "${dir}")
endforeach()

find_package(Doxygen)
if (DOXYGEN_FOUND AND EXISTS ${IGNITION_CMAKE_DOXYGEN_DIR}/api.in)

Expand All @@ -137,7 +145,7 @@ function(ign_create_docs)
# about the spaces between input files/directories. If you put each cmake
# variable on a separate line to make this `set` command more readable,
# then doxygen will not generate the correct/complete output.
set(IGNITION_DOXYGEN_INPUT "${IGNITION_DOXYGEN_API_MAINPAGE_MD} ${IGNITION_DOXYGEN_AUTOGENERATED_DOC} ${IGNITION_DOXYGEN_TUTORIALS_DIR} ${IGNITION_DOXYGEN_TUTORIALS_MAINPAGE_MD} ${ign_doxygen_component_input_dirs}")
set(IGNITION_DOXYGEN_INPUT "${IGNITION_DOXYGEN_API_MAINPAGE_MD} ${IGNITION_DOXYGEN_AUTOGENERATED_DOC} ${IGNITION_DOXYGEN_TUTORIALS_DIR} ${IGNITION_DOXYGEN_TUTORIALS_MAINPAGE_MD} ${ign_doxygen_component_input_dirs} ${IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS}")
chapulina marked this conversation as resolved.
Show resolved Hide resolved
configure_file(${IGNITION_CMAKE_DOXYGEN_DIR}/api.in
${CMAKE_BINARY_DIR}/api.dox @ONLY)

Expand Down