Restored PlantUML support for doxygen

pull/3549/head
Maksim Shabunin 10 years ago
parent ad6a80f68c
commit ec9a17e71a
  1. 15
      CMakeLists.txt
  2. 5
      doc/CMakeLists.txt
  3. 1
      doc/Doxyfile.in

@ -473,10 +473,22 @@ include(cmake/OpenCVFindLibsPerf.cmake)
# Detect other 3rd-party libraries/tools
# ----------------------------------------------------------------------------
# --- Doxygen for documentation ---
# --- Doxygen and PlantUML for documentation ---
unset(DOXYGEN_FOUND CACHE)
if(BUILD_DOCS)
find_package(Doxygen)
if (PLANTUML_JAR)
message(STATUS "Using PlantUML path from command line: ${PLANTUML_JAR}")
elseif(DEFINED ENV{PLANTUML_JAR})
set(PLANTUML_JAR $ENV{PLANTUML_JAR})
message(STATUS "Using PLantUML path from environment: ${PLANTUML_JAR}")
else()
message(STATUS "To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake")
endif()
if (PLANTUML_JAR AND DOXYGEN_VERSION VERSION_LESS 1.8.8)
message(STATUS "You need Doxygen version 1.8.8 or later to use PlantUML")
unset(PLANTUML_JAR)
endif()
endif(BUILD_DOCS)
# --- Python Support ---
@ -1080,6 +1092,7 @@ if(BUILD_DOCS)
status("")
status(" Documentation:")
status(" Doxygen:" DOXYGEN_FOUND THEN "${DOXYGEN_EXECUTABLE} (ver ${DOXYGEN_VERSION})" ELSE NO)
status(" PlantUML:" PLANTUML_JAR THEN "${PLANTUML_JAR}" ELSE NO)
endif()
# ========================== samples and tests ==========================

@ -129,6 +129,11 @@ if(BUILD_DOCS AND DOXYGEN_FOUND)
set(CMAKE_DOXYGEN_MAIN_REFERENCE "${refs_main}")
set(CMAKE_DOXYGEN_EXTRA_REFERENCE "${refs_extra}")
set(CMAKE_EXTRA_BIB_FILES "${bibfile} ${paths_bib}")
if(PLANTUML_JAR)
set(CMAKE_DOXYGEN_PLANTUML_SUPPORT "PLANTUML_JAR_PATH = ${PLANTUML_JAR}\n")
else()
set(CMAKE_DOXYGEN_PLANTUML_SUPPORT "ALIASES += startuml{1}=\"@warning __No plantuml!__ \\n \\n @if DUMMY_PLANTUML_CODE\" enduml=\"@endif\"\n")
endif()
# writing file
configure_file(Doxyfile.in ${doxyfile} @ONLY)

@ -285,3 +285,4 @@ DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
@CMAKE_DOXYGEN_PLANTUML_SUPPORT@

Loading…
Cancel
Save