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

Include IMAGE_PATH directories in ign_create_docs #183

Merged
merged 4 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 8 additions & 1 deletion cmake/IgnCreateDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# 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.
# IMAGE_PATH_DIRS: Optional. Specify additional input directories where images are located
# 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 @@ -45,7 +46,7 @@ function(ign_create_docs)
# Define the expected arguments
set(options)
set(oneValueArgs API_MAINPAGE_MD AUTOGENERATED_DOC TUTORIALS_MAINPAGE_MD)
set(multiValueArgs "TAGFILES" "ADDITIONAL_INPUT_DIRS")
set(multiValueArgs "TAGFILES" "ADDITIONAL_INPUT_DIRS" "IMAGE_PATH_DIRS")

option(BUILD_DOCS "Build docs" ON)
if (NOT ${BUILD_DOCS})
Expand Down Expand Up @@ -133,6 +134,12 @@ function(ign_create_docs)
ign_string_append(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS "${dir}")
endforeach()

set(IGNITION_DOXYGEN_IMAGE_PATH " ")

foreach(dir ${ign_create_docs_IMAGE_PATH_DIRS})
ign_string_append(IGNITION_DOXYGEN_IMAGE_PATH "${dir}")
endforeach()

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

Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/api.in
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH =
IMAGE_PATH = @IGNITION_DOXYGEN_IMAGE_PATH@

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down