From ec9a17e71a2923bf3a095086a2966b0e49f997a2 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 26 Dec 2014 11:57:41 +0300 Subject: [PATCH] Restored PlantUML support for doxygen --- CMakeLists.txt | 15 ++++++++++++++- doc/CMakeLists.txt | 5 +++++ doc/Doxyfile.in | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc83e3c..75fcf96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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= 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 ========================== diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 09f9645..67e730a 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -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) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 624e83b..24ef50c 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -285,3 +285,4 @@ DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES +@CMAKE_DOXYGEN_PLANTUML_SUPPORT@ -- 2.7.4