From abcc91c510282db54e301abe2e5233f981278ed4 Mon Sep 17 00:00:00 2001 From: ahcorde Date: Wed, 25 Aug 2021 18:34:35 +0200 Subject: [PATCH 1/2] Include IMAGE_PATH directories in ign_create_docs Signed-off-by: ahcorde --- cmake/IgnCreateDocs.cmake | 8 +++++++- doc/doxygen/api.in | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/IgnCreateDocs.cmake b/cmake/IgnCreateDocs.cmake index 617d9de3..8db2ae14 100644 --- a/cmake/IgnCreateDocs.cmake +++ b/cmake/IgnCreateDocs.cmake @@ -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-_DOXYGEN_TAGFILE} = ${IGNITION-_API_URL}" function(ign_create_docs) @@ -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}) @@ -133,6 +134,11 @@ 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) diff --git a/doc/doxygen/api.in b/doc/doxygen/api.in index e8fcedd2..607bde4f 100644 --- a/doc/doxygen/api.in +++ b/doc/doxygen/api.in @@ -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 From dfb9f23f73be9e58b79372e59966f838c9117e4b Mon Sep 17 00:00:00 2001 From: ahcorde Date: Wed, 25 Aug 2021 21:01:14 +0200 Subject: [PATCH 2/2] style Signed-off-by: ahcorde --- cmake/IgnCreateDocs.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/IgnCreateDocs.cmake b/cmake/IgnCreateDocs.cmake index 8db2ae14..17a8b8ae 100644 --- a/cmake/IgnCreateDocs.cmake +++ b/cmake/IgnCreateDocs.cmake @@ -135,6 +135,7 @@ function(ign_create_docs) endforeach() set(IGNITION_DOXYGEN_IMAGE_PATH " ") + foreach(dir ${ign_create_docs_IMAGE_PATH_DIRS}) ign_string_append(IGNITION_DOXYGEN_IMAGE_PATH "${dir}") endforeach()