Skip to content

Commit 4d8093a

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 150ef2c commit 4d8093a

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
@@ -38,6 +38,8 @@ LT_INIT([dlopen win32-dll disable-static])
3838
AC_SUBST([LIBXMLXX_MODULES], ['libxml-2.0 >= 2.7.7 glibmm-2.68 >= 2.68.0'])
3939
AC_SUBST([LIBXML2_LIB_NO_PKGCONFIG], [''])
4040
AC_SUBST([MSVC_TOOLSET_VER], [''])
41+
AC_SUBST(DOXYGEN_HAVE_DOT, [YES])
42+
AM_SUBST_NOTMAKE(DOXYGEN_HAVE_DOT)
4143
PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES])
4244

4345
AC_LANG([C++])

docs/reference/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ EXTERNAL_PAGES = YES
306306
#---------------------------------------------------------------------------
307307
DIA_PATH =
308308
HIDE_UNDOC_RELATIONS = NO
309-
HAVE_DOT = YES
309+
HAVE_DOT = @DOXYGEN_HAVE_DOT@
310310
DOT_NUM_THREADS = 0
311311
DOT_FONTNAME = Sans
312312
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
@@ -224,9 +224,14 @@ if maintainer_mode and not mm_common_get.found()
224224
mm_common_get = find_program('mm-common-get', required: true)
225225
endif
226226
doxygen = find_program('doxygen', required: build_documentation)
227-
dot = find_program('dot', required: build_documentation) # Used by Doxygen
227+
dot = find_program('dot', required: false) # Used by Doxygen, if found
228228
xsltproc = find_program('xsltproc', required: build_documentation)
229229

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

0 commit comments

Comments
 (0)