Skip to content

Commit 504c2ec

Browse files
committed
Meson build: Don't require the 'dot' command
Make it possible to build documentation without the dot command. Set the HAVE_DOT option in Doxyfile during configuration. In Autotools builds it's still unconditionally YES. The inheritance diagrams don't look as nice without the dot command from the GraphViz package. See #98
1 parent ea2c16e commit 504c2ec

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ AS_IF([test "x$enable_benchmark" = xyes],[
7474
])
7575

7676
AC_SUBST(MSVC_STATIC_CXXFLAG, '')
77+
AC_SUBST(DOXYGEN_HAVE_DOT, [YES])
78+
AM_SUBST_NOTMAKE(DOXYGEN_HAVE_DOT)
7779

7880
AC_CONFIG_FILES([Makefile
7981
${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in

docs/docs/reference/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ EXTERNAL_PAGES = YES
296296
#---------------------------------------------------------------------------
297297
DIA_PATH =
298298
HIDE_UNDOC_RELATIONS = NO
299-
HAVE_DOT = YES
299+
HAVE_DOT = @DOXYGEN_HAVE_DOT@
300300
DOT_NUM_THREADS = 0
301301
DOT_FONTNAME = Sans
302302
DOT_FONTSIZE = 10

docs/docs/reference/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Input: project_build_root, project_source_root, sigcxx_pcname,
44
# sigcxx_api_version, build_documentation, source_h_files,
55
# hg_ccg_basenames, install_datadir, python3, doc_reference,
6-
# can_add_dist_script
6+
# can_add_dist_script, dot
77
# Output: install_docdir, install_devhelpdir, book_name,
88
# if build_documentation: tag_file
99

@@ -60,6 +60,7 @@ doc_conf_data.set('abs_top_builddir', project_build_root)
6060
doc_conf_data.set('abs_top_srcdir', project_source_root)
6161
doc_conf_data.set('SIGCXX_API_VERSION', sigcxx_api_version)
6262
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
63+
doc_conf_data.set('DOXYGEN_HAVE_DOT', dot.found() ? 'YES' : 'NO')
6364

6465
doxyfile = configure_file(
6566
input: 'Doxyfile.in',

meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,14 @@ if maintainer_mode and not mm_common_get.found()
134134
endif
135135

136136
doxygen = find_program('doxygen', required: build_documentation)
137-
dot = find_program('dot', required: build_documentation) # Used by Doxygen
137+
dot = find_program('dot', required: false) # Used by Doxygen, if found
138138
xsltproc = find_program('xsltproc', required: build_documentation)
139139

140+
if build_documentation and not dot.found()
141+
message('The \'dot\' command is not found.\n ' + \
142+
'This will affect the look of the inheritance diagrams in the documentation.')
143+
endif
144+
140145
script_dir = project_source_root / 'untracked' / 'build_scripts'
141146
doc_reference = script_dir / 'doc-reference.py'
142147
dist_changelog = script_dir / 'dist-changelog.py'

0 commit comments

Comments
 (0)