Skip to content

Commit 631af2f

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 bdf5b64 commit 631af2f

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
@@ -84,6 +84,8 @@ AS_IF([test "x$enable_benchmark" = xyes],[
8484
])
8585

8686
AC_SUBST(MSVC_STATIC_CXXFLAG, '')
87+
AC_SUBST(DOXYGEN_HAVE_DOT, [YES])
88+
AM_SUBST_NOTMAKE(DOXYGEN_HAVE_DOT)
8789

8890
AC_CONFIG_FILES([Makefile
8991
${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in

docs/reference/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ EXTERNAL_PAGES = YES
300300
#---------------------------------------------------------------------------
301301
DIA_PATH =
302302
HIDE_UNDOC_RELATIONS = NO
303-
HAVE_DOT = YES
303+
HAVE_DOT = @DOXYGEN_HAVE_DOT@
304304
DOT_NUM_THREADS = 0
305305
DOT_FONTNAME = Sans
306306
DOT_FONTSIZE = 10

docs/reference/meson.build

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

99
tag_file_modules = [
@@ -57,6 +57,7 @@ doc_conf_data.set('abs_top_builddir', built_files_root)
5757
doc_conf_data.set('abs_top_srcdir', project_source_root)
5858
doc_conf_data.set('SIGCXX_API_VERSION', sigcxx_api_version)
5959
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
60+
doc_conf_data.set('DOXYGEN_HAVE_DOT', dot.found() ? 'YES' : 'NO')
6061

6162
doxyfile = configure_file(
6263
input: 'Doxyfile.in',

meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,14 @@ if maintainer_mode and not mm_common_get.found()
136136
endif
137137
m4 = find_program('m4', required: maintainer_mode) # For building C++ code
138138
doxygen = find_program('doxygen', required: build_documentation)
139-
dot = find_program('dot', required: build_documentation) # Used by Doxygen
139+
dot = find_program('dot', required: false) # Used by Doxygen, if found
140140
xsltproc = find_program('xsltproc', required: build_documentation)
141141

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

0 commit comments

Comments
 (0)