gnucash stable: Doxygen: Set header version to VCS version if building from VCS
John Ralls
jralls at code.gnucash.org
Thu Jul 16 17:05:04 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/828a80d0 (commit)
from https://github.com/Gnucash/gnucash/commit/0fe7389e (commit)
commit 828a80d0bc48a4b46ba6f1e3743e2a1f898a4c01
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jul 16 13:46:34 2026 -0700
Doxygen: Set header version to VCS version if building from VCS
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b17db6276..46c31fb516 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -894,6 +894,15 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/common/config.h.cmake.in ${CONFIG_H}
# The doxygen developer documentation
find_program(DOXYGEN doxygen)
if (NOT ${DOXYGEN} STREQUAL "DOXYGEN-NOTFOUND")
+ if (BUILDING_FROM_VCS)
+ execute_process(
+ COMMAND ${SHELL} "${CMAKE_SOURCE_DIR}/util/gnc-vcs-info" -r "${CMAKE_SOURCE_DIR}"
+ OUTPUT_VARIABLE VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ else()
+ set(VERSION ${PROJECT_VERSION})
+ endif()
configure_file(doxygen.cfg.in doxygen.cfg)
add_custom_target(doc ${DOXYGEN} doxygen.cfg)
endif()
diff --git a/doxygen.cfg.in b/doxygen.cfg.in
index 69460040b3..c29978040d 100644
--- a/doxygen.cfg.in
+++ b/doxygen.cfg.in
@@ -48,7 +48,7 @@ PROJECT_NAME = ${PACKAGE_NAME}
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = ${PROJECT_VERSION}
+PROJECT_NUMBER = ${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
Summary of changes:
CMakeLists.txt | 9 +++++++++
doxygen.cfg.in | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list