Give Effector a version and a changelog, shown from the menu

The version is the project() line of CMakeLists.txt and nowhere else:
CMake writes it, with the text of CHANGELOG.md, into a generated
core/version.hpp, so the number and the release notes the binary shows
are the ones it was built from. effector --version (-V) prints it, and
the header-bar menu gains a section with Changelog, a window laying the
Markdown out as headings and bullets, and About Effector.

The core tests hold the newest changelog entry to the current version,
so a bump cannot go in without its notes. Releases are tagged vX.Y.Z;
this is 0.5.0, and the changelog reconstructs 0.1.0-0.4.0 from the
history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Si
2026-09-26 10:14:43 +02:00
co-authored by Claude Opus 5.5
parent 431fcf9c58
commit b9f905e04c
12 changed files with 350 additions and 2 deletions
+10 -2
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project(effector VERSION 0.1.0 LANGUAGES CXX)
project(effector VERSION 0.5.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -21,6 +21,14 @@ pkg_check_modules(PANGOCAIRO REQUIRED IMPORTED_TARGET pangocairo)
find_package(Threads REQUIRED)
# --- version: the one number, and the changelog that goes with it ------------
# The version is the project() line above; each release is a vX.Y.Z tag on the
# commit that set it. CHANGELOG.md is baked in so the interface can show it,
# and editing it re-runs the configure step.
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md EFFECTOR_CHANGELOG)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS CHANGELOG.md)
configure_file(src/core/version.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/generated/core/version.hpp @ONLY)
# --- core: effects and image handling, no GUI ---------------------------------
add_library(effector_core STATIC
src/core/canvas.cpp
@@ -48,7 +56,7 @@ add_library(effector_core STATIC
src/effects/tiles.cpp
src/effects/warp.cpp
)
target_include_directories(effector_core PUBLIC src)
target_include_directories(effector_core PUBLIC src ${CMAKE_CURRENT_BINARY_DIR}/generated)
# The core is GUI-free: it only needs gdk-pixbuf for decoding and encoding,
# so headless rendering works without a display.
target_link_libraries(effector_core PUBLIC PkgConfig::GDKPIXBUF PkgConfig::PANGOCAIRO Threads::Threads)