FindPlantUML¶
PlantUML is a tool that transforms a text file into various model diagrams. See https://plantuml.com for details about writing PlantUML files. This module looks for PlantUML. It prefers an invocation script installed by some PlantUML system packages, and falls back to running Java if a script is unavailable.
Result Variables¶
This module defines the following variables:
- PlantUML_FOUND¶
True if PlantUML is found, false if it is not.
- PlantUML_VERSION¶
The version reported by
plantuml -version.
- PlantUML_EXECUTABLE¶
The path to the PlantUML program or script. Some systems install a wrapper script to run the PlantUML jar file. This is an advanced cache variable.
- PlantUML_COMAND¶
The command you can use in
execute_process(). This abstracts away the need to check PlantUML_EXECUTABLE or PlantUML_JAR.
Commands¶
- run_plantuml¶
Run PlantUML on .puml files to generate diagram images. If
PLANTUML_FOUNDisfalse, the command prints a warning and skips running PlantUML.run_plantuml(directory [PLANTUML_ARGS arg [arg ...]])
directoryRun PlantUML on .puml files in this directory.
PLANTUML_ARGSA list of command line arguments to pass to the PlantUML command. The list is empty by default. Do not specify PlantUML files to process; this function specifies the files for you.
Examples¶
Render design diagrams as SVG images:
find_package(PlantUML)
run_plantuml(
"${CMAKE_SOURCE_DIR}/design_diagrams"
PLANTUML_ARGS -tsvg
)