doc: auto-enabling DOT support in documentation if dot executable has been found

pull/25171/head
Maksim Shabunin 8 months ago
parent f174363f60
commit ad61e7e21d
  1. 18
      doc/CMakeLists.txt

@ -17,8 +17,8 @@ endif()
find_package(Doxygen)
if(DOXYGEN_FOUND)
if (DOXYGEN_VERSION VERSION_LESS 1.9.8)
message(WARNING "Found doxygen ${DOXYGEN_VERSION}, version 1.9.8 is used for testing, there is
a chance your documentation will look different or have some limitations.")
message(WARNING "Found doxygen ${DOXYGEN_VERSION}, version 1.9.8 is used for testing, there is "
"a chance your documentation will look different or have some limitations.")
endif()
add_custom_target(doxygen)
@ -197,10 +197,18 @@ if(DOXYGEN_FOUND)
set(OPENCV_MATHJAX_RELPATH "https://cdn.jsdelivr.net/npm/mathjax@3.0.1" CACHE STRING "URI to a MathJax installation")
set(OPENCV_DOCS_DOT_PATH "" CACHE PATH "Doxygen/DOT_PATH value")
set(CMAKECONFIG_DOT_PATH "${OPENCV_DOCS_DOT_PATH}")
set(OPENCV_DOCS_HAVE_DOT "NO" CACHE BOOL "Doxygen: build extra diagrams")
if (DOXYGEN_DOT_EXECUTABLE)
message(STATUS "Found DOT executable: ${DOXYGEN_DOT_EXECUTABLE}")
set(init_dot_path "${DOXYGEN_DOT_EXECUTABLE}")
set(init_dot_mode "YES")
else()
set(init_dot_path "")
set(init_dot_mode "NO")
endif()
set(OPENCV_DOCS_DOT_PATH "${init_dot_path}" CACHE PATH "Doxygen/DOT_PATH value")
set(OPENCV_DOCS_HAVE_DOT "${init_dot_mode}" CACHE BOOL "Doxygen: build extra diagrams")
set(CMAKECONFIG_DOT_PATH "${OPENCV_DOCS_DOT_PATH}")
set(CMAKECONFIG_HAVE_DOT "${OPENCV_DOCS_HAVE_DOT}")
# 'png' is good enough for compatibility (but requires +50% storage space)

Loading…
Cancel
Save