aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-09-29 16:47:48 +0200
committerThomas White <taw@physics.org>2021-09-29 16:47:48 +0200
commit151629cd57e7047683bfce48b393f6e21da9b90d (patch)
treee0019c35761cfe0687675d3b1125bd776a46d294
parent9438abb00b495f28c5b2c306fe4d391f6a44acc9 (diff)
Fix Doxygen version numbers
This also removes Doxygen from the CMake build system. It doesn't seem worth trying to make it work both ways. Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/48
-rw-r--r--libcrystfel/CMakeLists.txt11
-rw-r--r--libcrystfel/doc/Doxyfile.in4
-rw-r--r--libcrystfel/doc/index.md7
-rw-r--r--libcrystfel/meson.build9
4 files changed, 10 insertions, 21 deletions
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt
index 77290677..83f1e983 100644
--- a/libcrystfel/CMakeLists.txt
+++ b/libcrystfel/CMakeLists.txt
@@ -8,7 +8,6 @@ find_package(ZLIB REQUIRED)
find_package(FLEX REQUIRED)
find_package(BISON REQUIRED)
pkg_check_modules(MSGPACK msgpack)
-find_package(Doxygen)
pkg_check_modules(FFTW fftw3)
pkg_check_modules(LIBCCP4 libccp4c)
@@ -103,16 +102,6 @@ set(LIBCRYSTFEL_HEADERS
src/fom.h
)
-if (DOXYGEN_FOUND)
- configure_file(${PROJECT_SOURCE_DIR}/doc/index.md index.md)
- set(DOXYGEN_SHOW_INCLUDE_FILES NO)
- set(DOXYGEN_WARN_IF_UNDOCUMENTED NO)
- set(DOXYGEN_PREDEFINED HAVE_FFTW)
- doxygen_add_docs(api-docs ${PROJECT_SOURCE_DIR}/src
- ${CMAKE_CURRENT_BINARY_DIR}/index.md
- ${PROJECT_SOURCE_DIR}/doc/coding.md)
-endif (DOXYGEN_FOUND)
-
add_library(${PROJECT_NAME} SHARED
${LIBCRYSTFEL_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/libcrystfel-version.c
diff --git a/libcrystfel/doc/Doxyfile.in b/libcrystfel/doc/Doxyfile.in
index b3d42b18..0c74bfce 100644
--- a/libcrystfel/doc/Doxyfile.in
+++ b/libcrystfel/doc/Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "libcrystfel"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = @VERSION@
+@INCLUDE = "libcrystfel/Doxyfile-version"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -251,7 +251,7 @@ TAB_SIZE = 4
# commands \{ and \} for these it is advised to use the version @{ and @} or use
# a double escape (\\{ and \\})
-ALIASES =
+ALIASES = apirevision=@API_REVISION@
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
diff --git a/libcrystfel/doc/index.md b/libcrystfel/doc/index.md
index f1c72ed4..fc4275f4 100644
--- a/libcrystfel/doc/index.md
+++ b/libcrystfel/doc/index.md
@@ -1,10 +1,5 @@
\mainpage libcrystfel index page
-Version
-=======
-This documentation is for libcrystfel from CrystFEL ${CRYSTFEL_VERSION}, API
-revision ${CRYSTFEL_API_VERSION}.
-
Abstract
========
This is the internal documentation for CrystFEL. Unless you are looking at
@@ -13,6 +8,8 @@ this. You might use the information here when reading the code or to better
understand how the software works, or refer to it when creating a new
program within the suite.
+API revision \apirevision.
+
Coding standards
================
Please see the \ref coding "section on coding standards" for CrystFEL's coding
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build
index 968e58a3..05c80473 100644
--- a/libcrystfel/meson.build
+++ b/libcrystfel/meson.build
@@ -174,8 +174,8 @@ install_headers(['src/reflist.h',
doxygen = find_program('doxygen', required: false)
if doxygen.found()
- index_md = files('doc/index.md')
- coding_md = files('doc/coding.md')
+ vers = vcs_tag(input: 'doc/Doxyfile-version.in',
+ output: 'Doxyfile-version')
doc_data = configuration_data()
doc_data.set('DOX_TOP', join_paths(meson.current_source_dir(), 'src'))
@@ -183,13 +183,16 @@ if doxygen.found()
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.set('API_REVISION', libcrystfel_api_version)
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],
+ depends: vers)
endif