Skip to content

Commit

Permalink
add docs/cmake/EnableDoxygen.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMasarik-NOAA committed Jul 24, 2024
1 parent 724c296 commit 755b799
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/cmake/EnableDoxygen.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# doxygen documentation- Matt Masarik 24-Jul-2024.
function(EnableDoxygen outdir)
find_package(Doxygen)
if (NOT DOXYGEN_FOUND)
add_custom_target(enable_docs
COMMAND false
COMMENT "Doxygen not found")
return()
endif()

set(src_basedir "${CMAKE_SOURCE_DIR}")
set(bin_basedir "${CMAKE_BINARY_DIR}")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}/html)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in
${CMAKE_BINARY_DIR}/${outdir}/Doxyfile @ONLY)
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_QUIET YES)
###MTM set(DOXYGEN_HTML_OUTPUT ${CMAKE_BINARY_DIR}/${outdir}/html)
add_custom_target(enable_docs
COMMAND
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile
###MTM ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}
COMMENT "Generate Doxygen HTML documentation")
message("-- Doxygen HTML index page: "
${CMAKE_BINARY_DIR}/${outdir}/html/index.html)
endfunction()

0 comments on commit 755b799

Please sign in to comment.