How to set PLANTUML_JAR_PATH

To simplify example I have a docs directory with the following content:

  • plantuml.jar
  • CMakeLists.txt
  • index.md with embedded PlantUML

CMakeLists.txt:

set(PLANTUML_JAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/plantuml.jar")

doxygen_add_docs(docs
        "${CMAKE_CURRENT_SOURCE_DIR}/index.md")

I run cmake, then make docs and get the following message:

docs/index.md:52: warning: ignoring \startuml command because PLANTUML_JAR_PATH is not set

CMake generated Doxyfile.docs:

PLANTUML_JAR_PATH      = 
PLANTUML_CFG_FILE      = 
PLANTUML_INCLUDE_PATH  = 

Documentation is generated but without PlantUML diagrams. What am I doing wrong?

I used cmake 3.16.3 and 3.19.3 on Ubuntu 20.04.2 LTS and CnetOS 8.3.2011 with the same result.

I don’t see where the Doxyfile gets generated by FindDoxygen's doxygen_add_docs. does it come from for you?

Oh, I think I see now. Maybe you need DOXYGEN_PLANTUML_JAR_PATH instead?

1 Like

It works with DOXYGEN_ prefix. Thank you. This was not clear to me in the documentation.

Yeah, it’s a bit buried I think. I’ve submitted an MR to help clarify what the CMake variable naming scheme is.

This is a very good idea.