Skip to content

Commit

Permalink
Include IMAGE_PATH directories in ign_create_docs (gazebosim#183)
Browse files Browse the repository at this point in the history
* Include IMAGE_PATH directories in ign_create_docs

Signed-off-by: ahcorde <ahcorde@gmail.com>

* style

Signed-off-by: ahcorde <ahcorde@gmail.com>

Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
  • Loading branch information
2 people authored and srmainwaring committed Mar 1, 2022
1 parent ee6b1a8 commit aca4ab6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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

0 comments on commit aca4ab6

Please sign in to comment.