From 55e2440d62243bd80003b2fc98540633c7f57cc8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 10:56:40 +0200 Subject: feat: surface the version and adopt semantic versioning The version was declared in the project() call and used nowhere. It is now generated into version.h from that single declaration, so nothing repeats the literal, and it reaches the places it is actually wanted: --version, --help, the window title, and QApplication. --version and --help are answered before the web engine schemes are registered and before QApplication is constructed. Printing one line does not need a GUI, and both must work on a machine where the GUI cannot open. Staying at 0.1.0 rather than calling this 1.0.0: under semver, 0.x is where the interface may still change, and for this project the interface is the config file format and the bindable action names. Both are one manual verification pass old. 1.0.0 becomes a deliberate decision to stop changing them under users. Co-Authored-By: Claude Opus 5 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9364240..ed9db9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,13 @@ message(STATUS "Found notmuch: ${NOTMUCH_LIBRARY}") find_package(PkgConfig REQUIRED) pkg_check_modules(GMIME REQUIRED IMPORTED_TARGET gmime-3.0) +# The version lives only in the project() call above; version.h is generated +# from it so no source file repeats the literal. +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/generated/qtmaildir/version.h + @ONLY) + enable_testing() add_subdirectory(src) add_subdirectory(tests) -- cgit v1.2.3