diff options
author | Thomas White <taw@physics.org> | 2021-06-25 17:03:10 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-06-25 17:03:10 +0200 |
commit | c58836d6da8eead94756990087bc3ccc70903eca (patch) | |
tree | 2c3c615593ef03828f54fdb348fa597b6144e5ae | |
parent | be404dd09125a700a7d8d98ee65932ff6900c904 (diff) |
Meson: Fix build without Doxygen
-rw-r--r-- | libcrystfel/meson.build | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index 8ed03454..07d7b9f4 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -169,24 +169,26 @@ install_headers(['src/reflist.h', subdir: 'crystfel') # API documentation (Doxygen) -doxygen = find_program('doxygen') +doxygen = find_program('doxygen', required: false) -index_md = files('doc/index.md') -coding_md = files('doc/coding.md') +if doxygen.found() + index_md = files('doc/index.md') + coding_md = files('doc/coding.md') -doc_data = configuration_data() -doc_data.set('DOX_TOP', join_paths(meson.current_source_dir(), 'src')) -doc_data.set('INDEX_MD', join_paths(meson.current_source_dir(), 'doc/index.md')) -doc_data.set('CODING_MD', join_paths(meson.current_source_dir(), 'doc/coding.md')) -doc_data.set('OUTPUT_DIR', join_paths(meson.current_build_dir(), 'docs')) -doc_data.set('VERSION', meson.project_version()) + doc_data = configuration_data() + doc_data.set('DOX_TOP', join_paths(meson.current_source_dir(), 'src')) + doc_data.set('INDEX_MD', join_paths(meson.current_source_dir(), 'doc/index.md')) + doc_data.set('CODING_MD', join_paths(meson.current_source_dir(), 'doc/coding.md')) + doc_data.set('OUTPUT_DIR', join_paths(meson.current_build_dir(), 'docs')) + doc_data.set('VERSION', meson.project_version()) -doxyfile = configure_file(input: 'doc/Doxyfile.in', - output: 'Doxyfile', - configuration: doc_data, - install: false) + doxyfile = configure_file(input: 'doc/Doxyfile.in', + output: 'Doxyfile', + configuration: doc_data, + install: false) -api_docs = run_target('api-docs', command : [doxygen, doxyfile]) + api_docs = run_target('api-docs', command : [doxygen, doxyfile]) +endif # pkg-config file |