Skip to content

Commit 771ad1b

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 libsigcplusplus/libsigcplusplus#98
1 parent 46c124a commit 771ad1b

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
@@ -37,6 +37,8 @@ LT_INIT([dlopen win32-dll disable-static])
3737
AC_SUBST([LIBXMLXX_MODULES], ['libxml-2.0 >= 2.7.7 glibmm-2.4 >= 2.32.0'])
3838
AC_SUBST([LIBXML2_LIB_NO_PKGCONFIG], [''])
3939
AC_SUBST([MSVC_TOOLSET_VER], [''])
40+
AC_SUBST(DOXYGEN_HAVE_DOT, [YES])
41+
AM_SUBST_NOTMAKE(DOXYGEN_HAVE_DOT)
4042
PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES])
4143

4244
AC_LANG([C++])

docs/reference/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ EXTERNAL_PAGES = YES
313313
#---------------------------------------------------------------------------
314314
DIA_PATH =
315315
HIDE_UNDOC_RELATIONS = NO
316-
HAVE_DOT = YES
316+
HAVE_DOT = @DOXYGEN_HAVE_DOT@
317317
DOT_NUM_THREADS = 0
318318
DOT_FONTNAME = Sans
319319
DOT_FONTSIZE = 10

docs/reference/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Input: project_build_root, project_source_root, xmlxx_pcname,
44
# xmlxx_api_version, build_documentation, source_h_files,
5-
# install_datadir, python3, doc_reference_py, can_add_dist_script
5+
# install_datadir, python3, doc_reference_py, can_add_dist_script, dot
66
# Output: install_docdir, install_devhelpdir, book_name,
77
# if build_documentation: tag_file
88

@@ -61,6 +61,7 @@ doc_conf_data.set('abs_top_builddir', project_build_root)
6161
doc_conf_data.set('abs_top_srcdir', project_source_root)
6262
doc_conf_data.set('LIBXMLXX_MODULE_NAME', book_name)
6363
doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles)
64+
doc_conf_data.set('DOXYGEN_HAVE_DOT', dot.found() ? 'YES' : 'NO')
6465

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

meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,14 @@ if maintainer_mode and not mm_common_get.found()
225225
mm_common_get = find_program('mm-common-get', required: true)
226226
endif
227227
doxygen = find_program('doxygen', required: build_documentation)
228-
dot = find_program('dot', required: build_documentation) # Used by Doxygen
228+
dot = find_program('dot', required: false) # Used by Doxygen, if found
229229
xsltproc = find_program('xsltproc', required: build_documentation)
230230

231+
if build_documentation and not dot.found()
232+
message('The \'dot\' command is not found.\n ' + \
233+
'This will affect the look of the inheritance diagrams in the documentation.')
234+
endif
235+
231236
# Script files copied to 'untracked/' by mm-common-get.
232237
script_dir = project_source_root / 'untracked' / 'build_scripts'
233238
doc_reference_py = script_dir / 'doc-reference.py'

0 commit comments

Comments
 (0)