Skip to content

Commit 76b2a3e

Browse files
committed
Doxygen: add build option to use svg instead of png files for graphs
Differential Revision: http://reviews.llvm.org/D11994 llvm-svn: 245256
1 parent f6f6d88 commit 76b2a3e

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

llvm/docs/CMake.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@ LLVM-specific variables
387387
``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise this has no
388388
effect.
389389

390+
**LLVM_DOXYGEN_SVG**:BOOL
391+
Uses .svg files instead of .png files for graphs in the Doxygen output.
392+
Defaults to OFF.
393+
390394
**LLVM_ENABLE_SPHINX**:BOOL
391395
If enabled CMake will search for the ``sphinx-build`` executable and will make
392396
the ``SPHINX_OUTPUT_HTML`` and ``SPHINX_OUTPUT_MAN`` CMake options available.

llvm/docs/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ if (LLVM_ENABLE_DOXYGEN)
5656
set(llvm_doxygen_qhp_cust_filter_attrs "")
5757
endif()
5858

59+
option(LLVM_DOXYGEN_SVG
60+
"Use svg instead of png files for doxygen graphs." OFF)
61+
if (LLVM_DOXYGEN_SVG)
62+
set(DOT_IMAGE_FORMAT "svg")
63+
else()
64+
set(DOT_IMAGE_FORMAT "png")
65+
endif()
66+
5967
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
6068
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6169

@@ -73,6 +81,7 @@ if (LLVM_ENABLE_DOXYGEN)
7381
set(llvm_doxygen_qhelpgenerator_path)
7482
set(llvm_doxygen_qhp_cust_filter_name)
7583
set(llvm_doxygen_qhp_cust_filter_attrs)
84+
set(DOT_IMAGE_FORMAT)
7685

7786
add_custom_target(doxygen-llvm
7887
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

llvm/docs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
3131
-e 's/@llvm_doxygen_qhp_cust_filter_name@//g' \
3232
-e 's/@llvm_doxygen_qhp_namespace@//g' \
3333
-e 's/@searchengine_url@//g' \
34+
-e 's/@DOT_IMAGE_FORMAT@/png/g' \
3435
> $@
3536
endif
3637

llvm/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ DIRECTORY_GRAPH = YES
22052205
# The default value is: png.
22062206
# This tag requires that the tag HAVE_DOT is set to YES.
22072207

2208-
DOT_IMAGE_FORMAT = png
2208+
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
22092209

22102210
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22112211
# enable generation of interactive SVG images that allow zooming and panning.

0 commit comments

Comments
 (0)