Skip to content

Commit

Permalink
Docs: style doxygen when built as part of OpenAMP docs
Browse files Browse the repository at this point in the history
Detect when we are a submodule of OpenAMP-docs.
If so use the top level's Doxyfile overrides on top of our Doxyfile.
If not, no change.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
  • Loading branch information
wmamills authored and arnopo committed Oct 13, 2023
1 parent 5fce292 commit 329fe10
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions doc/CMakeLists.txt
@@ -1,11 +1,23 @@
if (DOXYGEN_FOUND)

configure_file (Doxyfile.in Doxyfile @ONLY)
if (EXISTS ${CMAKE_SOURCE_DIR}/../_doxygen/openamp/Doxyfile-openamp.in)
set (OAMP_DOX_DIR ${CMAKE_SOURCE_DIR}/../_doxygen/openamp)
configure_file (Doxyfile.in Doxyfile1 @ONLY)
configure_file (${OAMP_DOX_DIR}/Doxyfile-openamp.in Doxyfile2 @ONLY)

add_custom_target (doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target (doc ALL
COMMAND cat Doxyfile1 Doxyfile2 >Doxyfile
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
else ()
configure_file (Doxyfile.in Doxyfile @ONLY)

add_custom_target (doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif ()

install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION share/doc/${PROJECT_NAME})
Expand Down

0 comments on commit 329fe10

Please sign in to comment.